diff options
author | elijah <elijah@riseup.net> | 2016-04-08 10:41:54 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-04-08 10:41:54 -0700 |
commit | 82b15a8a071ba099cf52bb00c66caebdbd265273 (patch) | |
tree | 3f27b0673839be7d10ed5b401216ab79e43ce751 /tests/white-box/couchdb.rb | |
parent | 44666c42ce836fb611dfd9c1b549e955c470814c (diff) | |
parent | eac3056c237d523f4786593922fe8f88eb65dff7 (diff) |
Merge branch 'feature/mxtest' into develop
Diffstat (limited to 'tests/white-box/couchdb.rb')
-rw-r--r-- | tests/white-box/couchdb.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/white-box/couchdb.rb b/tests/white-box/couchdb.rb index da226cc9..859b4745 100644 --- a/tests/white-box/couchdb.rb +++ b/tests/white-box/couchdb.rb @@ -127,6 +127,33 @@ class CouchDB < LeapTest pass end + # + # This is not really a "test", just an attempt to make sure that + # the mx tests that fire off dummy emails don't fill up the + # storage db. + # + # mx tests can't run this because they don't have access to + # the storage db. + # + # This "test" is responsible for both creating the db if it does not + # exist, and destroying if it does. + # + # Yes, this is super hacky. Properly, we should add something to + # the soledad api to support create/delete of user storage dbs. + # + def test_99_Delete_mail_storage_used_in_mx_tests + user = find_user_by_login(TEST_EMAIL_USER) + if user + if user_db_exists?(user["id"]) + # keep the test email db from filling up: + assert_destroy_user_db(user["id"], :username => 'admin') + end + # either way, make sure we leave a db for the mx tests: + assert_create_user_db(user["id"], :username => 'admin') + end + # no 'pass' at the end, since this is not a real test. + end + private def multimaster? |