aboutsummaryrefslogtreecommitdiff
path: root/kolla/tests
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2020-10-20 10:54:17 +0200
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2020-10-27 11:13:18 +0100
commitc4c28814e06fc0f90f7679ef9b1831cd3d89f692 (patch)
treeb470167d23194cfde5448669c5ad7981d13eddd4 /kolla/tests
parentefaab1f3a568543a4a22d6b0789e8210d00eec4f (diff)
downloadkolla-c4c28814e06fc0f90f7679ef9b1831cd3d89f692.tar.gz
kolla-c4c28814e06fc0f90f7679ef9b1831cd3d89f692.zip
build: unbreak JSON serializer on failed builds
Commit 3fa5a236b4d8a31a57e14cbb482e664d5cc0111c converted status consts into Enum. But not completely - this fix gets it done properly. Also fixed tests. Change-Id: Ifdacf62cd4b99c452bd09de7c6cde6fbee75560d
Diffstat (limited to 'kolla/tests')
-rw-r--r--kolla/tests/test_build.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py
index 2812e115e..00bdd6d32 100644
--- a/kolla/tests/test_build.py
+++ b/kolla/tests/test_build.py
@@ -646,11 +646,11 @@ class KollaWorkerTest(base.TestCase):
def test_summary(self):
kolla = build.KollaWorker(self.conf)
kolla.images = self.images
- kolla.image_statuses_good['good'] = None
- kolla.image_statuses_bad['bad'] = None
- kolla.image_statuses_unmatched['unmatched'] = None
+ kolla.image_statuses_good['good'] = build.Status.BUILT
+ kolla.image_statuses_bad['bad'] = build.Status.ERROR
+ kolla.image_statuses_unmatched['unmatched'] = build.Status.UNMATCHED
results = kolla.summary()
- self.assertIsNone(results['failed'][0]['status'])
+ self.assertEqual('error', results['failed'][0]['status'])
@mock.patch('shutil.copytree')
def test_work_dir(self, copytree_mock):