Repository: couchdb-setup Updated Branches: refs/heads/master cd7d0ecc0 -> deeb073ad
Rename cassim db to _metadata This closes #1 COUCHDB-2619 COUCHDB-2620 Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/deeb073a Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/deeb073a Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/deeb073a Branch: refs/heads/master Commit: deeb073ad16f54286e7fa7f6606b1d353171f6d8 Parents: cd7d0ec Author: Alexander Shorin <[email protected]> Authored: Thu Feb 26 22:29:43 2015 +0300 Committer: Alexander Shorin <[email protected]> Committed: Thu Feb 26 23:28:49 2015 +0300 ---------------------------------------------------------------------- README.md | 2 +- src/setup.erl | 12 ++++++------ test/t.sh | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/deeb073a/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 4929dc2..7043b0f 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ in Fauxton. b. Same as in a. - this manages the final setup bits, like creating the _users, - _replicator and _cassim/_metadata, _db_updates endpoints and + _replicator and _metadata, _db_updates endpoints and whatever else is needed. // TBD: collect what else is needed. http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/deeb073a/src/setup.erl ---------------------------------------------------------------------- diff --git a/src/setup.erl b/src/setup.erl index c48a616..b04b0ba 100644 --- a/src/setup.erl +++ b/src/setup.erl @@ -46,12 +46,12 @@ is_cluster_enabled() -> has_cluster_system_dbs() -> - % GET /_users /_replicator /_cassim + % GET /_users /_replicator /_metadata case catch { fabric:get_db_info("_users"), fabric:get_db_info("_replicator"), - fabric:get_db_info("cassim")} of + fabric:get_db_info("_metadata")} of {{ok, _}, {ok, _}, {ok, _}} -> ok; _ -> no end. @@ -75,7 +75,7 @@ enable_cluster_int(Options, no) -> NewBindAddress = proplists:get_value(bind_address, Options), ok = require_admins(CurrentAdmins, NewCredentials), ok = require_bind_address(CurrentBindAddress, NewBindAddress), - + case NewCredentials of {undefined, undefined} -> ok; @@ -89,7 +89,7 @@ enable_cluster_int(Options, no) -> NewBindAddress -> config:set("httpd", "bind_address", binary_to_list(NewBindAddress)) end, - + Port = proplists:get_value(port, Options), case Port of undefined -> @@ -115,8 +115,8 @@ finish_cluster() -> finish_cluster_int(ok) -> {error, cluster_finished}; finish_cluster_int(no) -> - % create clustered databases (_users, _replicator, _cassim/_metadata - Databases = ["_users", "_replicator", "cassim"], + % create clustered databases (_users, _replicator, _metadata) + Databases = ["_users", "_replicator", "_metadata"], lists:foreach(fun fabric:create_db/1, Databases). http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/deeb073a/test/t.sh ---------------------------------------------------------------------- diff --git a/test/t.sh b/test/t.sh index f7c1e76..e323bbf 100755 --- a/test/t.sh +++ b/test/t.sh @@ -48,11 +48,11 @@ curl a:[email protected]:15984/_cluster_setup -d '{"action":"finish_cluster"}' $HEADER # Show system dbs exist on node A curl a:[email protected]:15984/_users curl a:[email protected]:15984/_replicator -curl a:[email protected]:15984/cassim +curl a:[email protected]:15984/_metadata # Show system dbs exist on node B curl a:[email protected]:25984/_users curl a:[email protected]:25984/_replicator -curl a:[email protected]:25984/cassim +curl a:[email protected]:25984/_metadata -echo "YAY ALL GOOD" \ No newline at end of file +echo "YAY ALL GOOD"
