diff options
author | Jan Lehnardt <jan@apache.org> | 2014-11-07 15:01:52 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2014-11-07 15:01:52 +0100 |
commit | fc39fab4ed8f1492785d5d510307db9d2ac2a082 (patch) | |
tree | 95d3b26c8ba371af4ef79a5d621c017d324476eb | |
parent | 92da54ed202802e4e8cc8f2e5c5e62fd70ea4dd7 (diff) | |
download | couchdb-fc39fab4ed8f1492785d5d510307db9d2ac2a082.tar.gz |
add simple test script
-rwxr-xr-x | test/t.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/t.sh b/test/t.sh new file mode 100755 index 000000000..7b1ca1b9a --- /dev/null +++ b/test/t.sh @@ -0,0 +1,34 @@ +#!/bin/sh -ex + +HEADERS="-HContent-Type:application/json" +# show cluster state: +curl a:b@127.0.0.1:15986/nodes/_all_docs + +# Enable Cluster on node A +curl a:b@127.0.0.1:15984/_cluster_setup -d '{"action":"enable_cluster","username":"foo","password":"baz","bind_address":"0.0.0.0"}' $HEADERS + +# Enable Cluster on node B +curl a:b@127.0.0.1:25984/_cluster_setup -d '{"action":"enable_cluster","username":"foo","password":"baz","bind_address":"0.0.0.0"}' $HEADERS + +# Add node B on node A +curl a:b@127.0.0.1:15984/_cluster_setup -d '{"action":"add_node","username":"foo","password":"baz","host":"127.0.0.1","port":25984}' $HEADERS + +# Show cluster state: +curl a:b@127.0.0.1:15986/nodes/_all_docs + +# Show db doesn’t exist on node A +curl a:b@127.0.0.1:15984/foo + +# Show db doesn’t exist on node B +curl a:b@127.0.0.1:25984/foo + +# Create database (on node A) +curl -X PUT a:b@127.0.0.1:15984/foo + +# Show db does exist on node A +curl a:b@127.0.0.1:15984/foo + +# Show db does exist on node B +curl a:b@127.0.0.1:25984/foo + +echo "YAY ALL GOOD"
\ No newline at end of file |