Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Mark tests that need couch
  • Loading branch information
drebs committed Jun 2, 2018
1 parent 556097e commit 34137b6
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/couch/test_atomicity.py
Expand Up @@ -41,6 +41,7 @@
REPEAT_TIMES = 20


@pytest.mark.needs_couch
@pytest.mark.usefixtures('method_tmpdir')
class CouchAtomicityTestCase(CouchDBTestCase, TestCaseWithServer):

Expand Down
8 changes: 8 additions & 0 deletions tests/couch/test_backend.py
Expand Up @@ -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
Expand All @@ -35,6 +36,7 @@
# The following tests come from `u1db.tests.test_common_backend`.
# -----------------------------------------------------------------------------

@pytest.mark.needs_couch
class TestCouchBackendImpl(CouchDBTestCase):

def test__allocate_doc_id(self):
Expand All @@ -53,12 +55,14 @@ def test__allocate_doc_id(self):
# 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,
Expand All @@ -67,6 +71,7 @@ class CouchBackendTests(
scenarios = COUCH_SCENARIOS


@pytest.mark.needs_couch
class CouchValidateGenNTransIdTests(
TestWithScenarios,
test_backends.LocalDatabaseValidateGenNTransIdTests,
Expand All @@ -75,6 +80,7 @@ class CouchValidateGenNTransIdTests(
scenarios = COUCH_SCENARIOS


@pytest.mark.needs_couch
class CouchValidateSourceGenTests(
TestWithScenarios,
test_backends.LocalDatabaseValidateSourceGenTests,
Expand All @@ -83,6 +89,7 @@ class CouchValidateSourceGenTests(
scenarios = COUCH_SCENARIOS


@pytest.mark.needs_couch
class CouchWithConflictsTests(
TestWithScenarios,
test_backends.LocalDatabaseWithConflictsTests,
Expand All @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions tests/couch/test_command.py
@@ -1,3 +1,4 @@
import pytest
from twisted.trial import unittest

from leap.soledad.common.couch import state as couch_state
Expand All @@ -6,6 +7,7 @@
from mock import Mock


@pytest.mark.needs_couch
class CommandBasedDBCreationTest(unittest.TestCase):

def test_ensure_db_using_custom_command(self):
Expand Down
2 changes: 2 additions & 0 deletions tests/couch/test_ddocs.py
@@ -1,10 +1,12 @@
import pytest
from uuid import uuid4

from leap.soledad.common import couch

from test_soledad.util import CouchDBTestCase


@pytest.mark.needs_couch
class CouchDesignDocsTests(CouchDBTestCase):

def setUp(self):
Expand Down
1 change: 1 addition & 0 deletions tests/couch/test_state.py
Expand Up @@ -25,6 +25,7 @@ def _set_list(self, *args, **kwargs):
return _set_list


@pytest.mark.needs_couch
class CouchStateTests(CouchDBTestCase):

def setUp(self):
Expand Down
2 changes: 2 additions & 0 deletions tests/couch/test_sync.py
@@ -1,3 +1,4 @@
import pytest
from leap.soledad.common.l2db import vectorclock
from leap.soledad.common.l2db import errors as u1db_errors

Expand All @@ -24,6 +25,7 @@
# The following tests come from `u1db.tests.test_sync`.
# -----------------------------------------------------------------------------

@pytest.mark.needs_couch
class CouchBackendSyncTests(
TestWithScenarios,
DatabaseBaseTests,
Expand Down
2 changes: 2 additions & 0 deletions tests/couch/test_sync_target.py
@@ -1,4 +1,5 @@
import json
import pytest

from leap.soledad.common.l2db import SyncTarget
from leap.soledad.common.l2db import errors as u1db_errors
Expand All @@ -19,6 +20,7 @@
('local', {'create_db_and_target': make_local_db_and_target}), ]


@pytest.mark.needs_couch
class CouchBackendSyncTargetTests(
TestWithScenarios,
DatabaseBaseTests,
Expand Down
1 change: 1 addition & 0 deletions tests/server/test_incoming_server.py
Expand Up @@ -36,6 +36,7 @@
from test_soledad.util import CouchDBTestCase


@pytest.mark.needs_couch
class IncomingOnCouchServerTestCase(CouchDBTestCase):

def setUp(self):
Expand Down
1 change: 1 addition & 0 deletions tests/server/test_tac.py
Expand Up @@ -36,6 +36,7 @@
TAC_FILE_PATH = resource_filename('leap.soledad.server', 'server.tac')


@pytest.mark.needs_couch
@pytest.mark.usefixtures("couch_url")
class TacServerTestCase(unittest.TestCase):

Expand Down

0 comments on commit 34137b6

Please sign in to comment.