diff options
| author | Scott Moser <smoser@ubuntu.com> | 2018-10-01 18:23:34 +0000 |
|---|---|---|
| committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-10-01 18:23:34 +0000 |
| commit | 40768bad4c7eb966b2a8c1308cdae22e578b2413 (patch) | |
| tree | 0c89c35c6bff4fc827b3703ef5f5f1b6efedd057 /tests/cloud_tests/testcases/base.py | |
| parent | c239eb82f1bfe1d0c4b79f2a733f04cfb3277fbf (diff) | |
| download | vyos-cloud-init-40768bad4c7eb966b2a8c1308cdae22e578b2413.tar.gz vyos-cloud-init-40768bad4c7eb966b2a8c1308cdae22e578b2413.zip | |
tests: allow skipping an entire cloud_test without running.
Individual skipTest or setUp SkipTest will still launch the instance.
This allows us to stop the running of the instance so we don't
waste cycles or boot systems that are known to fail.
Also replace remaining unittest usage in tests/cloud_tests/
with unittest2.
Diffstat (limited to 'tests/cloud_tests/testcases/base.py')
| -rw-r--r-- | tests/cloud_tests/testcases/base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/cloud_tests/testcases/base.py b/tests/cloud_tests/testcases/base.py index e83cb9a6..e18d601c 100644 --- a/tests/cloud_tests/testcases/base.py +++ b/tests/cloud_tests/testcases/base.py @@ -31,6 +31,11 @@ class CloudTestCase(unittest2.TestCase): def is_distro(self, distro_name): return self.os_cfg['os'] == distro_name + @classmethod + def maybeSkipTest(cls): + """Present to allow subclasses to override and raise a skipTest.""" + pass + def assertPackageInstalled(self, name, version=None): """Check dpkg-query --show output for matching package name. |
