summaryrefslogtreecommitdiff
path: root/tests/integration_tests/modules/test_users_groups.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-12-03 13:17:55 -0500
committerGitHub <noreply@github.com>2020-12-03 13:17:55 -0500
commit6c4e87bf336073183f8ae8964366d574c7ee4823 (patch)
tree23cf3538e08f86986ef9a363b525c1f9b96a84aa /tests/integration_tests/modules/test_users_groups.py
parented9bd19ca88e4c6458c95d26151c734112615e9a (diff)
downloadvyos-cloud-init-6c4e87bf336073183f8ae8964366d574c7ee4823.tar.gz
vyos-cloud-init-6c4e87bf336073183f8ae8964366d574c7ee4823.zip
integration_tests: introduce skipping of tests by OS (#702)
This introduces an optional, more complex OS_IMAGE format (`<image id>::<os>::<release>`) which allows the specification of the OS/OS release which the given image ID corresponds to. This information is used to skip tests which do not apply to the image. This commit is comprised of the following discrete changes: * introduce the IntegrationImage class, to handle parsing and storing the new OS_IMAGE format * support inferring the OS and OS release of Ubuntu series, so that we can continue to set OS_IMAGE to just a series name and have test skipping work * add documentation on Image Selection to integration_tests.rst * introduce the actual skipping behaviour based on OS marks * apply the `ubuntu` mark to all tests that should be skipped on non-Ubuntu operating systems
Diffstat (limited to 'tests/integration_tests/modules/test_users_groups.py')
-rw-r--r--tests/integration_tests/modules/test_users_groups.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/integration_tests/modules/test_users_groups.py b/tests/integration_tests/modules/test_users_groups.py
index 6a51f5a6..ee08d87b 100644
--- a/tests/integration_tests/modules/test_users_groups.py
+++ b/tests/integration_tests/modules/test_users_groups.py
@@ -2,6 +2,10 @@
This test specifies a number of users and groups via user-data, and confirms
that they have been configured correctly in the system under test.
+
+TODO:
+* This test assumes that the "ubuntu" user will be created when "default" is
+ specified; this will need modification to run on other OSes.
"""
import re
@@ -41,6 +45,7 @@ AHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/
@pytest.mark.ci
@pytest.mark.user_data(USER_DATA)
class TestUsersGroups:
+ @pytest.mark.ubuntu
@pytest.mark.parametrize(
"getent_args,regex",
[