From 54f91a1b2f07f9c4b4a5e92a177fe701469da25a Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Mon, 5 Jun 2017 13:09:47 -0400 Subject: [PATCH] Add API query test for Swift This test will be useful in gauging API availability for Swift during upgrades Change-Id: I1e5ac7ab1cfed15771fdb205d5736da206929bc6 --- bowling_ball/rolling_tests.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bowling_ball/rolling_tests.py b/bowling_ball/rolling_tests.py index e1461295..a8ddd6e1 100755 --- a/bowling_ball/rolling_tests.py +++ b/bowling_ball/rolling_tests.py @@ -218,6 +218,20 @@ class CinderTest(ServiceTest): return msg +class SwiftTest(ServiceTest): + service_name = 'swift' + description = 'Query for a list of containers' + + def run(self): + containers = self.get_objects('object_store', 'containers') + + msg = 'API reached, no containers found' + if containers: + msg = 'Container list received' + + return msg + + class TestRunner(object): """Run a test in a loop, with the option to gracefully exit""" stop_now = False @@ -311,6 +325,7 @@ available_tests = { 'nova': NovaTest, 'neutron': NeutronTest, 'cinder': CinderTest, + 'swift': SwiftTest, }