Merge "serverconfig: add test for mongo indexer, fix dev mongo config"

This commit is contained in:
Brad Fitzpatrick 2013-09-10 18:25:32 +00:00 committed by Gerrit Code Review
commit cdaaa2f746
3 changed files with 125 additions and 1 deletions

View File

@ -211,7 +211,7 @@
"enabled": ["_env", "${CAMLI_MONGO_ENABLED}", true],
"handler": "storage-mongodbindexer",
"handlerArgs": {
"servers": "localhost",
"host": "localhost",
"database": ["_env", "${CAMLI_DBNAME}"],
"blobSource": "/bs/"
}

View File

@ -0,0 +1,113 @@
{
"listen": "localhost:3179",
"auth": "userpass:camlistore:pass3179",
"https": false,
"prefixes": {
"/": {
"handler": "root",
"handlerArgs": {
"blobRoot": "/bs-and-maybe-also-index/",
"ownerName": "Alice",
"searchRoot": "/my-search/",
"statusRoot": "/status/",
"stealth": false
}
},
"/ui/": {
"handler": "ui",
"handlerArgs": {
"jsonSignRoot": "/sighelper/",
"cache": "/cache/",
"scaledImage": "lrucache"
}
},
"/setup/": {
"handler": "setup"
},
"/status/": {
"handler": "status"
},
"/share/": {
"handler": "share",
"handlerArgs": {
"blobRoot": "/bs/"
}
},
"/sync/": {
"handler": "sync",
"handlerArgs": {
"from": "/bs/",
"to": "/index-mongo/"
}
},
"/sighelper/": {
"handler": "jsonsign",
"handlerArgs": {
"secretRing": "/path/to/secring",
"keyId": "26F5ABDA",
"publicKeyDest": "/bs-and-index/"
}
},
"/bs-and-index/": {
"handler": "storage-replica",
"handlerArgs": {
"backends": ["/bs/", "/index-mongo/"]
}
},
"/bs-and-maybe-also-index/": {
"handler": "storage-cond",
"handlerArgs": {
"write": {
"if": "isSchema",
"then": "/bs-and-index/",
"else": "/bs/"
},
"read": "/bs/"
}
},
"/bs/": {
"handler": "storage-filesystem",
"handlerArgs": {
"path": "/tmp/blobs"
}
},
"/cache/": {
"handler": "storage-filesystem",
"handlerArgs": {
"path": "/tmp/blobs/cache"
}
},
"/index-mongo/": {
"enabled": true,
"handler": "storage-mongodbindexer",
"handlerArgs": {
"host": "localhost",
"database": "camlitest",
"blobSource": "/bs/",
"user": "",
"password": ""
}
},
"/my-search/": {
"handler": "search",
"handlerArgs": {
"index": "/index-mongo/",
"owner": "sha1-f2b0b7da718b97ce8c31591d8ed4645c777f3ef4"
}
}
}
}

11
pkg/serverconfig/testdata/mongo.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"listen": "localhost:3179",
"auth": "userpass:camlistore:pass3179",
"blobPath": "/tmp/blobs",
"dbname": "camlitest",
"mongo": ":@localhost",
"identity": "26F5ABDA",
"identitySecretRing": "/path/to/secring",
"ownerName": "Alice",
"shareHandlerPath": "/share/"
}