From e17b921e3973e77932bce05c7a7a126362885c0f Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 11 Aug 2017 10:34:49 -0700 Subject: [PATCH] Add test for all-nodes-error-limited Change-Id: I4132c8fceec92dcbb04dd018ed49f1d76899cb25 --- test/unit/proxy/controllers/test_container.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/proxy/controllers/test_container.py b/test/unit/proxy/controllers/test_container.py index 8c1cba804b..548e3342cf 100644 --- a/test/unit/proxy/controllers/test_container.py +++ b/test/unit/proxy/controllers/test_container.py @@ -259,6 +259,13 @@ class TestContainerController(TestRingBase): self.fail('Some requests did not have expected response:\n' + '\n'.join(failures)) + # One more test, simulating all nodes being error-limited + with mocked_http_conn(), mock.patch.object(self.app, 'iter_nodes', + return_value=[]): + req = Request.blank('/v1/a/c') + resp = req.get_response(self.app) + self.assertEqual(resp.status_int, 503) + def test_response_code_for_PUT(self): PUT_TEST_CASES = [ ((201, 201, 201), 201),