Merge lp:~bjornt/landscape-charm/reenable-LandscapeLeaderDestroyedLayer into lp:~landscape/landscape-charm/trunk

Proposed by Björn Tillenius
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 359
Merged at revision: 358
Proposed branch: lp:~bjornt/landscape-charm/reenable-LandscapeLeaderDestroyedLayer
Merge into: lp:~landscape/landscape-charm/trunk
Diff against target: 54 lines (+12/-8)
2 files modified
tests/basic/test_leader.py (+2/-4)
tests/layers.py (+10/-4)
To merge this branch: bzr merge lp:~bjornt/landscape-charm/reenable-LandscapeLeaderDestroyedLayer
Reviewer Review Type Date Requested Status
Adam Collard (community) Approve
🤖 Landscape Builder test results Approve
Chris Glass (community) Approve
Review via email: mp+298878@code.launchpad.net

Commit message

Reenable the LandscapeLeaderDestroyedLayer integration tests.

The bug that prevented those tests from passing has long been fixed in
Juju.

This branch also fixes OneLandscapeUnitLayer so that it doesn't clean up the
environment after every test, which caused a lot of test failures.

Description of the change

Reenable the LandscapeLeaderDestroyedLayer integration tests.

The bug that prevented those tests from passing has long been fixed in
Juju.

I also fixed OneLandscapeUnitLayer so that it doesn't clean up the
environment after every test, which caused a lot of test failures.

Testing instructions:

Sadly running the whole test suite is problematic at this time, since we
haven't made sure that the integration test suite is runnable.

I'd suggest bootstrapping the environment manually and run:

    zope-testrunner3 -vv --path tests --tests-pattern basic \
        --layer LandscapeLeaderDestroyedLayer

Note that you might have to run that twice due to
https://github.com/juju/amulet/issues/105

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Chris Glass (tribaal) wrote :

+1!

review: Approve
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Adam Collard (adam-collard) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/basic/test_leader.py'
2--- tests/basic/test_leader.py 2016-02-02 23:13:43 +0000
3+++ tests/basic/test_leader.py 2016-07-01 10:38:34 +0000
4@@ -1,9 +1,7 @@
5 from helpers import IntegrationTest
6 from layers import LandscapeLeaderDestroyedLayer
7-import unittest
8-
9-
10-@unittest.skip("Needs lp:1511659 fixed")
11+
12+
13 class LandscapeLeaderDestroyedTest(IntegrationTest):
14 """Test what happens when the landscape-server leader gets destroyed.
15
16
17=== modified file 'tests/layers.py'
18--- tests/layers.py 2016-02-02 23:13:43 +0000
19+++ tests/layers.py 2016-07-01 10:38:34 +0000
20@@ -15,7 +15,7 @@
21 cls.environment.setUp()
22
23 @classmethod
24- def testTearDown(cls):
25+ def tearDown(cls):
26 cls.environment.cleanUp()
27
28
29@@ -69,6 +69,15 @@
30 cls.leader, cls.non_leaders = cls.environment.get_unit_ids(
31 "landscape-server")
32
33+ @classmethod
34+ def tearDown(cls):
35+ """Empty teardown.
36+
37+ This method needs to be here, in order to avoid
38+ OneLandscapeUnitLayer.tearDown from being called when
39+ TwoLandscapeUnitsLayer gets teared down.
40+ """
41+
42
43 class LandscapeLeaderDestroyedLayer(TwoLandscapeUnitsLayer):
44 """Layer for tests meant to run when the leader has been destroyed.
45@@ -80,9 +89,6 @@
46
47 @classmethod
48 def setUp(cls):
49- # XXX: https://bugs.launchpad.net/landscape-charm/+bug/1541128
50- # https://bugs.launchpad.net/juju-core/+bug/1511659
51- return
52 cls.environment.destroy_landscape_leader()
53 cls.leader, cls.non_leaders = cls.environment.get_unit_ids(
54 "landscape-server")

Subscribers

People subscribed via source and target branches