From c1d170225281a39973dda1b8e46f5b3b5c943d1a Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 10 Jul 2019 15:37:44 -0700 Subject: [PATCH] functests: Make test_PUT_metadata less flakey Change-Id: I846e746c2fe7591a3ab502428f587e3cbe753225 --- test/functional/test_container.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/test_container.py b/test/functional/test_container.py index 35aaf82f82..5e2963446c 100644 --- a/test/functional/test_container.py +++ b/test/functional/test_container.py @@ -207,7 +207,7 @@ class TestContainer(unittest2.TestCase): name = uuid4().hex resp = retry(put, name, 'Value') resp.read() - self.assertEqual(resp.status, 201) + self.assertIn(resp.status, (201, 202)) resp = retry(head, name) resp.read() self.assertIn(resp.status, (200, 204)) @@ -218,12 +218,12 @@ class TestContainer(unittest2.TestCase): self.assertEqual(resp.getheader('x-container-meta-test'), 'Value') resp = retry(delete, name) resp.read() - self.assertEqual(resp.status, 204) + self.assertIn(resp.status, (204, 404)) name = uuid4().hex resp = retry(put, name, '') resp.read() - self.assertEqual(resp.status, 201) + self.assertIn(resp.status, (201, 202)) resp = retry(head, name) resp.read() self.assertIn(resp.status, (200, 204)) @@ -234,7 +234,7 @@ class TestContainer(unittest2.TestCase): self.assertIsNone(resp.getheader('x-container-meta-test')) resp = retry(delete, name) resp.read() - self.assertEqual(resp.status, 204) + self.assertIn(resp.status, (204, 404)) def test_POST_metadata(self): if tf.skip: