Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
leap
soledad
Commits
34137b6b
Commit
34137b6b
authored
Jun 02, 2018
by
drebs
Browse files
Mark tests that need couch
parent
556097ec
Changes
9
Hide whitespace changes
Inline
Side-by-side
tests/couch/test_atomicity.py
View file @
34137b6b
...
...
@@ -41,6 +41,7 @@ from test_soledad.u1db_tests import TestCaseWithServer
REPEAT_TIMES
=
20
@
pytest
.
mark
.
needs_couch
@
pytest
.
mark
.
usefixtures
(
'method_tmpdir'
)
class
CouchAtomicityTestCase
(
CouchDBTestCase
,
TestCaseWithServer
):
...
...
tests/couch/test_backend.py
View file @
34137b6b
...
...
@@ -18,6 +18,7 @@
Test ObjectStore and Couch backend bits.
"""
import
pytest
from
uuid
import
uuid4
from
six.moves.urllib.parse
import
urljoin
from
testscenarios
import
TestWithScenarios
...
...
@@ -35,6 +36,7 @@ from .common import COUCH_SCENARIOS
# The following tests come from `u1db.tests.test_common_backend`.
# -----------------------------------------------------------------------------
@
pytest
.
mark
.
needs_couch
class
TestCouchBackendImpl
(
CouchDBTestCase
):
def
test__allocate_doc_id
(
self
):
...
...
@@ -53,12 +55,14 @@ class TestCouchBackendImpl(CouchDBTestCase):
# The following tests come from `u1db.tests.test_backends`.
# -----------------------------------------------------------------------------
@
pytest
.
mark
.
needs_couch
class
CouchTests
(
TestWithScenarios
,
test_backends
.
AllDatabaseTests
,
CouchDBTestCase
):
scenarios
=
COUCH_SCENARIOS
@
pytest
.
mark
.
needs_couch
class
CouchBackendTests
(
TestWithScenarios
,
test_backends
.
LocalDatabaseTests
,
...
...
@@ -67,6 +71,7 @@ class CouchBackendTests(
scenarios
=
COUCH_SCENARIOS
@
pytest
.
mark
.
needs_couch
class
CouchValidateGenNTransIdTests
(
TestWithScenarios
,
test_backends
.
LocalDatabaseValidateGenNTransIdTests
,
...
...
@@ -75,6 +80,7 @@ class CouchValidateGenNTransIdTests(
scenarios
=
COUCH_SCENARIOS
@
pytest
.
mark
.
needs_couch
class
CouchValidateSourceGenTests
(
TestWithScenarios
,
test_backends
.
LocalDatabaseValidateSourceGenTests
,
...
...
@@ -83,6 +89,7 @@ class CouchValidateSourceGenTests(
scenarios
=
COUCH_SCENARIOS
@
pytest
.
mark
.
needs_couch
class
CouchWithConflictsTests
(
TestWithScenarios
,
test_backends
.
LocalDatabaseWithConflictsTests
,
...
...
@@ -103,6 +110,7 @@ class CouchWithConflictsTests(
# test_backends.DatabaseIndexTests.tearDown(self)
@
pytest
.
mark
.
needs_couch
class
DatabaseNameValidationTest
(
unittest
.
TestCase
):
def
test_database_name_validation
(
self
):
...
...
tests/couch/test_command.py
View file @
34137b6b
import
pytest
from
twisted.trial
import
unittest
from
leap.soledad.common.couch
import
state
as
couch_state
...
...
@@ -6,6 +7,7 @@ from leap.soledad.common.l2db import errors as u1db_errors
from
mock
import
Mock
@
pytest
.
mark
.
needs_couch
class
CommandBasedDBCreationTest
(
unittest
.
TestCase
):
def
test_ensure_db_using_custom_command
(
self
):
...
...
tests/couch/test_ddocs.py
View file @
34137b6b
import
pytest
from
uuid
import
uuid4
from
leap.soledad.common
import
couch
...
...
@@ -5,6 +6,7 @@ from leap.soledad.common import couch
from
test_soledad.util
import
CouchDBTestCase
@
pytest
.
mark
.
needs_couch
class
CouchDesignDocsTests
(
CouchDBTestCase
):
def
setUp
(
self
):
...
...
tests/couch/test_state.py
View file @
34137b6b
...
...
@@ -25,6 +25,7 @@ def restricted_listing(function):
return
_set_list
@
pytest
.
mark
.
needs_couch
class
CouchStateTests
(
CouchDBTestCase
):
def
setUp
(
self
):
...
...
tests/couch/test_sync.py
View file @
34137b6b
import
pytest
from
leap.soledad.common.l2db
import
vectorclock
from
leap.soledad.common.l2db
import
errors
as
u1db_errors
...
...
@@ -24,6 +25,7 @@ for name, scenario in COUCH_SCENARIOS:
# The following tests come from `u1db.tests.test_sync`.
# -----------------------------------------------------------------------------
@
pytest
.
mark
.
needs_couch
class
CouchBackendSyncTests
(
TestWithScenarios
,
DatabaseBaseTests
,
...
...
tests/couch/test_sync_target.py
View file @
34137b6b
import
json
import
pytest
from
leap.soledad.common.l2db
import
SyncTarget
from
leap.soledad.common.l2db
import
errors
as
u1db_errors
...
...
@@ -19,6 +20,7 @@ target_scenarios = [
(
'local'
,
{
'create_db_and_target'
:
make_local_db_and_target
}),
]
@
pytest
.
mark
.
needs_couch
class
CouchBackendSyncTargetTests
(
TestWithScenarios
,
DatabaseBaseTests
,
...
...
tests/server/test_incoming_server.py
View file @
34137b6b
...
...
@@ -36,6 +36,7 @@ from test_soledad.util import CouchServerStateForTests
from
test_soledad.util
import
CouchDBTestCase
@
pytest
.
mark
.
needs_couch
class
IncomingOnCouchServerTestCase
(
CouchDBTestCase
):
def
setUp
(
self
):
...
...
tests/server/test_tac.py
View file @
34137b6b
...
...
@@ -36,6 +36,7 @@ from twisted.web.client import Agent
TAC_FILE_PATH
=
resource_filename
(
'leap.soledad.server'
,
'server.tac'
)
@
pytest
.
mark
.
needs_couch
@
pytest
.
mark
.
usefixtures
(
"couch_url"
)
class
TacServerTestCase
(
unittest
.
TestCase
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment