From 436dd9fe237ae72b9ed46391f9f558ecb3cf9765 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Tue, 12 Feb 2019 22:08:00 +0100 Subject: [PATCH] Skip amphora scenario test if provider is not set This patch also removes py27 and py35 from list of envs in tox. We don't have functional tests. Change-Id: Id9255fe87d61bf6536c8d03f9dd7612abc451904 --- octavia_tempest_plugin/tests/scenario/v2/test_amphora.py | 9 +++++++++ tox.ini | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py b/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py index 4f1480cf..165424b1 100644 --- a/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py +++ b/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py @@ -30,6 +30,15 @@ CONF = config.CONF class AmphoraScenarioTest(test_base.LoadBalancerBaseTest): """Test the amphora object API.""" + @classmethod + def skip_checks(cls): + super(AmphoraScenarioTest, cls).skip_checks() + + if CONF.load_balancer.provider not in ['amphora', 'octavia']: + raise cls.skipException("Amphora tests require provider 'amphora' " + "or 'octavia' (alias to 'amphora', " + " deprecated) set") + @classmethod def resource_setup(cls): """Setup resources needed by the tests.""" diff --git a/tox.ini b/tox.ini index d7d9ddde..64afde0a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.0 -envlist = py35,py27,pep8 +envlist = pep8 skipsdist = True [testenv]