summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/testcases/modules/lxd_dir.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/testcases/modules/lxd_dir.py')
-rw-r--r--tests/cloud_tests/testcases/modules/lxd_dir.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/cloud_tests/testcases/modules/lxd_dir.py b/tests/cloud_tests/testcases/modules/lxd_dir.py
index 8bd8c6e6..797bafed 100644
--- a/tests/cloud_tests/testcases/modules/lxd_dir.py
+++ b/tests/cloud_tests/testcases/modules/lxd_dir.py
@@ -7,14 +7,15 @@ from tests.cloud_tests.testcases import base
class TestLxdDir(base.CloudTestCase):
"""Test LXD module."""
- def setUp(self):
+ @classmethod
+ def maybeSkipTest(cls):
"""Skip on cosmic for two reasons:
a.) LP: #1795036 - 'lxd init' fails on cosmic kernel.
b.) apt install lxd installs via snap which can be slow
as that will download core snap and lxd."""
- if self.os_name == "cosmic":
- raise self.skipTest('Skipping test on cosmic (LP: #1795036).')
- return base.CloudTestCase.setUp(self)
+ os_name = cls.data.get('os_name', 'UNKNOWN')
+ if os_name == "cosmic":
+ raise base.SkipTest('Skipping test on cosmic (LP: #1795036).')
def test_lxd(self):
"""Test lxd installed."""