From 2a57f749672580591b07065adde334029ddfb460 Mon Sep 17 00:00:00 2001 From: drebs Date: Sat, 23 Jul 2016 17:11:14 +0200 Subject: [test] adapt couch tests to use new generation/transaction storage scheme --- testing/tests/couch/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testing/tests/couch/common.py') diff --git a/testing/tests/couch/common.py b/testing/tests/couch/common.py index b08e1fa3..263ac94c 100644 --- a/testing/tests/couch/common.py +++ b/testing/tests/couch/common.py @@ -49,7 +49,6 @@ def copy_couch_database_for_test(test, db): elif 'u1db_rev' in doc: new_doc = { '_id': doc['_id'], - 'u1db_transactions': doc['u1db_transactions'], 'u1db_rev': doc['u1db_rev'] } attachments = [] @@ -65,6 +64,8 @@ def copy_couch_database_for_test(test, db): if (att is not None): new_couch_db.put_attachment(new_doc, att, filename=att_name) + elif doc_id.startswith('gen-'): + new_couch_db.save(doc) # cleanup connections to prevent file descriptor leaking return new_db -- cgit v1.2.3 From c3e0f52080041e2a01cfa483efe73f8503a10f31 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 22 Jul 2016 20:33:06 +0200 Subject: [feat] remove usage of design documents in couch Design documents are slow and we already have alternatives to all uses we used to make of them, so this commit completelly removes all usage of design documents. --- testing/tests/couch/common.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'testing/tests/couch/common.py') diff --git a/testing/tests/couch/common.py b/testing/tests/couch/common.py index 263ac94c..45cf8d7f 100644 --- a/testing/tests/couch/common.py +++ b/testing/tests/couch/common.py @@ -41,10 +41,6 @@ def copy_couch_database_for_test(test, db): # bypass u1db_config document if doc_id == 'u1db_config': pass - # copy design docs - elif doc_id.startswith('_design'): - del doc['_rev'] - new_couch_db.save(doc) # copy u1db docs elif 'u1db_rev' in doc: new_doc = { -- cgit v1.2.3 From fa2c50b9c6cc037a8ab348b5a746b2e728f3068a Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 25 Jul 2016 07:48:41 -0300 Subject: [test] allow custom couch url for couch tests --- testing/tests/couch/common.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'testing/tests/couch/common.py') diff --git a/testing/tests/couch/common.py b/testing/tests/couch/common.py index 45cf8d7f..48d30168 100644 --- a/testing/tests/couch/common.py +++ b/testing/tests/couch/common.py @@ -13,10 +13,9 @@ nested_doc = tests.nested_doc def make_couch_database_for_test(test, replica_uid): - port = str(test.couch_port) dbname = ('test-%s' % uuid4().hex) db = couch.CouchDatabase.open_database( - urljoin('http://localhost:' + port, dbname), + urljoin(test.couch_url, dbname), create=True, replica_uid=replica_uid or 'test', ensure_ddocs=True) @@ -25,8 +24,7 @@ def make_couch_database_for_test(test, replica_uid): def copy_couch_database_for_test(test, db): - port = str(test.couch_port) - couch_url = 'http://localhost:' + port + couch_url = test.couch_url new_dbname = db._dbname + '_copy' new_db = couch.CouchDatabase.open_database( urljoin(couch_url, new_dbname), -- cgit v1.2.3 From e8747096045933754d3f8ac2608cce844f6b0fee Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 17 Aug 2016 23:07:04 -0300 Subject: [tests] Adapt tests for ensure_ddocs death --- testing/tests/couch/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'testing/tests/couch/common.py') diff --git a/testing/tests/couch/common.py b/testing/tests/couch/common.py index 48d30168..84790059 100644 --- a/testing/tests/couch/common.py +++ b/testing/tests/couch/common.py @@ -17,8 +17,7 @@ def make_couch_database_for_test(test, replica_uid): db = couch.CouchDatabase.open_database( urljoin(test.couch_url, dbname), create=True, - replica_uid=replica_uid or 'test', - ensure_ddocs=True) + replica_uid=replica_uid or 'test') test.addCleanup(test.delete_db, dbname) return db -- cgit v1.2.3