From 52c2f7258416fcd54e9aeb50656830b55d653630 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Wed, 29 Jul 2015 14:11:48 -0300 Subject: [feat] Added requirements-latest pip file With this, you can setup soledad for using locally and running the tests with the latest head in a simpler way --- common/pkg/requirements-latest.pip | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 common/pkg/requirements-latest.pip (limited to 'common') diff --git a/common/pkg/requirements-latest.pip b/common/pkg/requirements-latest.pip new file mode 100644 index 00000000..929bb542 --- /dev/null +++ b/common/pkg/requirements-latest.pip @@ -0,0 +1,6 @@ +--index-url https://pypi.python.org/simple/ + +--allow-external u1db --allow-unverified u1db +--allow-external dirspec --allow-unverified dirspec +-e 'git+https://github.com/pixelated-project/leap_pycommon.git#egg=leap.common' +-e . -- cgit v1.2.3 From c8fcfb452392af6b54e36a4bd0788f7b412fdc5c Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 29 Jul 2015 16:21:33 -0300 Subject: [bug] specify develop branch when using -e requirements-latest.pip will try to clone and install. Since it is meant to be latest, I added a small change to specify the branch 'develop'. --- common/pkg/requirements-latest.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/pkg/requirements-latest.pip b/common/pkg/requirements-latest.pip index 929bb542..9de17382 100644 --- a/common/pkg/requirements-latest.pip +++ b/common/pkg/requirements-latest.pip @@ -2,5 +2,5 @@ --allow-external u1db --allow-unverified u1db --allow-external dirspec --allow-unverified dirspec --e 'git+https://github.com/pixelated-project/leap_pycommon.git#egg=leap.common' +-e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common' -e . -- cgit v1.2.3 From 970f898206d81694dbe1a1db84da923cc78fc915 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Wed, 29 Jul 2015 18:16:54 -0300 Subject: [test] Added events enabled flag to False for the tests The soledad tests were breaking after the change to zmq, the event server was trying to create a zmq instance but there are some missing files that prevented the tests from running just fixed those and the tests run again --- common/src/leap/soledad/common/tests/util.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/src/leap/soledad/common/tests/util.py b/common/src/leap/soledad/common/tests/util.py index d8d86850..140d0ea1 100644 --- a/common/src/leap/soledad/common/tests/util.py +++ b/common/src/leap/soledad/common/tests/util.py @@ -43,6 +43,7 @@ from u1db.remote import http_database from twisted.trial import unittest from leap.common.files import mkdir_p +from leap.common.events.flags import set_events_enabled from leap.soledad.common import soledad_assert from leap.soledad.common.document import SoledadDocument @@ -194,6 +195,9 @@ class BaseSoledadTest(unittest.TestCase, MockedSharedDBTest): # The following snippet comes from BaseLeapTest.setUpClass, but we # repeat it here because twisted.trial does not work with # setUpClass/tearDownClass. + + set_events_enabled(False) + self.old_path = os.environ['PATH'] self.old_home = os.environ['HOME'] self.tempdir = tempfile.mkdtemp(prefix="leap_tests-") -- cgit v1.2.3 From 54afb28b372118b0f08d0567b27034dd72fe63e7 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Mon, 3 Aug 2015 14:46:55 -0300 Subject: [bug] BaseSoledadTest now inherit from BaseLeapTest That is the right way TM to fix the events issue without explicitly setting the flag, as kaliy suggested --- common/src/leap/soledad/common/tests/util.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/src/leap/soledad/common/tests/util.py b/common/src/leap/soledad/common/tests/util.py index 140d0ea1..cbd92b94 100644 --- a/common/src/leap/soledad/common/tests/util.py +++ b/common/src/leap/soledad/common/tests/util.py @@ -43,7 +43,7 @@ from u1db.remote import http_database from twisted.trial import unittest from leap.common.files import mkdir_p -from leap.common.events.flags import set_events_enabled +from leap.common.testing.basetest import BaseLeapTest from leap.soledad.common import soledad_assert from leap.soledad.common.document import SoledadDocument @@ -185,7 +185,7 @@ def token_soledad_sync_target(test, path): return st -class BaseSoledadTest(unittest.TestCase, MockedSharedDBTest): +class BaseSoledadTest(BaseLeapTest, MockedSharedDBTest): """ Instantiates Soledad for usage in tests. """ @@ -196,8 +196,6 @@ class BaseSoledadTest(unittest.TestCase, MockedSharedDBTest): # repeat it here because twisted.trial does not work with # setUpClass/tearDownClass. - set_events_enabled(False) - self.old_path = os.environ['PATH'] self.old_home = os.environ['HOME'] self.tempdir = tempfile.mkdtemp(prefix="leap_tests-") -- cgit v1.2.3