From 71f2d1b0b7db6bb35dd6bd9220795aed3174d90b Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 27 Dec 2013 16:47:57 -0800 Subject: added more network tests and pgrep test helper --- tests/white-box/couchdb.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/white-box/couchdb.rb') diff --git a/tests/white-box/couchdb.rb b/tests/white-box/couchdb.rb index 3abddefc..c83e5714 100644 --- a/tests/white-box/couchdb.rb +++ b/tests/white-box/couchdb.rb @@ -3,6 +3,7 @@ raise SkipTest unless $node["services"].include?("couchdb") require 'json' class TestCouchdb < LeapTest + depends_on "TestNetwork" def setup end @@ -10,7 +11,7 @@ class TestCouchdb < LeapTest # # check to make sure we can get welcome response from local couchdb # - def test_01_is_running + def test_01_couch_is_running assert_get(couchdb_url) do |body| assert_match /"couchdb":"Welcome"/, body, "Could not get welcome message from #{couchdb_url}. Probably couchdb is not running." end @@ -39,7 +40,7 @@ class TestCouchdb < LeapTest # # this seems backward to me, so it might be the other way around. # - def test_03_replica_membership + def test_03_replica_membership_is_kosher url = couchdb_url("/_membership") assert_get(url) do |body| response = JSON.parse(body) @@ -64,12 +65,12 @@ class TestCouchdb < LeapTest response = JSON.parse(body) assert_equal 6, response['total_rows'] actual_users = response['rows'].map{|row| row['id'].sub(/^org.couchdb.user:/, '') } - assert_equal acl_users, actual_users + assert_equal acl_users.sort, actual_users.sort end pass end - def test_05_databases_exist + def test_05_required_databases_exist dbs_that_should_exist = ["customers","identities","keycache","sessions","shared","tickets","tokens","users"] dbs_that_should_exist.each do |db_name| assert_get(couchdb_url("/"+db_name)) do |body| -- cgit v1.2.3