Merge ~rgildein/juju-verify:ceph-functests-fix into ~canonical-solutions-engineering/juju-verify:master

Proposed by Robert Gildein
Status: Merged
Approved by: Martin Kalcok
Approved revision: 8c273f12bf9806ac711419cbdc4390c50f636cb6
Merged at revision: 810ae5127413c9cbfafe81a08f2917a098d0757d
Proposed branch: ~rgildein/juju-verify:ceph-functests-fix
Merge into: ~canonical-solutions-engineering/juju-verify:master
Diff against target: 97 lines (+16/-16)
2 files modified
tests/functional/tests/test_ceph.py (+11/-12)
tests/functional/tests/test_novacompute.py (+5/-4)
Reviewer Review Type Date Requested Status
Martin Kalcok (community) Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Canonical Solutions Engineering Team Pending
Review via email: mp+402213@code.launchpad.net

Commit message

logged each verifier result

 * logged each verifier result to get more information
 * fixed typo
 * removed unnecessary code

To post a comment you must log in.
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Kalcok (martin-kalcok) wrote :

Thanks fro cleaning this up.
+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 810ae5127413c9cbfafe81a08f2917a098d0757d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/functional/tests/test_ceph.py b/tests/functional/tests/test_ceph.py
2index 0e84632..0a772e1 100644
3--- a/tests/functional/tests/test_ceph.py
4+++ b/tests/functional/tests/test_ceph.py
5@@ -1,12 +1,14 @@
6 """Test deployment and functionality of juju-verify."""
7+import logging
8
9 from juju import loop
10-import zaza.model
11 from tests.base import BaseTestCase
12
13 from juju_verify import juju_verify
14 from juju_verify.verifiers import get_verifier
15
16+logger = logging.getLogger()
17+
18
19 class CephTests(BaseTestCase):
20 """Functional testing for Ceph verifier."""
21@@ -24,32 +26,29 @@ class CephTests(BaseTestCase):
22 unit_objects = loop.run(juju_verify.find_units(self.model, units))
23 verifier = get_verifier(unit_objects)
24 result = verifier.verify(check)
25- self.assertTrue(result.success is True)
26+ logger.info("result: %s", result)
27+ self.assertTrue(result.success)
28
29 def test_single_mon_unit(self):
30 """Test that shutdown of a single mon unit returns OK."""
31 # juju-verify shutdown --units ceph-mon/0
32
33 units = ['ceph-mon/0']
34- log_level = 'info'
35 check = 'shutdown'
36- juju_verify.config_logger(log_level)
37- model = loop.run(juju_verify.connect_model(zaza.model.CURRENT_MODEL))
38- unit_objects = loop.run(juju_verify.find_units(model, units))
39+ unit_objects = loop.run(juju_verify.find_units(self.model, units))
40 verifier = get_verifier(unit_objects)
41 result = verifier.verify(check)
42- self.assertTrue(result.success is True)
43+ logger.info("result: %s", result)
44+ self.assertTrue(result.success)
45
46 def test_two_mon_unit(self):
47 """Test that shutdown of multiple mon units fails."""
48 # juju-verify shutdown --units ceph-mon/0 ceph-mon/1
49
50 units = ['ceph-mon/0', 'ceph-mon/1']
51- log_level = 'info'
52 check = 'shutdown'
53- juju_verify.config_logger(log_level)
54- model = loop.run(juju_verify.connect_model(zaza.model.CURRENT_MODEL))
55- unit_objects = loop.run(juju_verify.find_units(model, units))
56+ unit_objects = loop.run(juju_verify.find_units(self.model, units))
57 verifier = get_verifier(unit_objects)
58 result = verifier.verify(check)
59- self.assertTrue(result.success is False)
60+ logger.info("result: %s", result)
61+ self.assertFalse(result.success)
62diff --git a/tests/functional/tests/test_novacompute.py b/tests/functional/tests/test_novacompute.py
63index ca810c8..9c260e9 100644
64--- a/tests/functional/tests/test_novacompute.py
65+++ b/tests/functional/tests/test_novacompute.py
66@@ -39,6 +39,7 @@ class NovaCompute(OpenstackBaseTestCase):
67 unit_objects = loop.run(juju_verify.find_units(self.model, units))
68 verifier = get_verifier(unit_objects)
69 result = verifier.verify(self.CHECK)
70+ logger.info("result: %s", result)
71 self.assertTrue(result.success)
72
73 def test_empty_az_fails(self):
74@@ -49,12 +50,12 @@ class NovaCompute(OpenstackBaseTestCase):
75 should then trigger empty AZ error.
76 """
77 nova_application = self.model.applications.get('nova-compute')
78- verfier = get_verifier(nova_application.units)
79+ verifier = get_verifier(nova_application.units)
80 expected_partial = Partial(Severity.FAIL, "Removing these units would leave "
81 "following availability zones empty: "
82 "{'nova'}")
83- result = verfier.verify(self.CHECK)
84-
85+ result = verifier.verify(self.CHECK)
86+ logger.info("result: %s", result)
87 self.assertFalse(result.success)
88 self.assertTrue(expected_partial in result.partials)
89
90@@ -83,7 +84,7 @@ class NovaCompute(OpenstackBaseTestCase):
91 verifier = get_verifier(target_unit)
92
93 result = verifier.verify(self.CHECK)
94-
95+ logger.info("result: %s", result)
96 self.assertFalse(result.success)
97 self.assertTrue(expected_partial in result.partials)
98

Subscribers

People subscribed via source and target branches