diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-12-03 13:17:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 13:17:55 -0500 |
commit | 6c4e87bf336073183f8ae8964366d574c7ee4823 (patch) | |
tree | 23cf3538e08f86986ef9a363b525c1f9b96a84aa /tests/integration_tests/integration_settings.py | |
parent | ed9bd19ca88e4c6458c95d26151c734112615e9a (diff) | |
download | vyos-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/integration_settings.py')
-rw-r--r-- | tests/integration_tests/integration_settings.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/integration_tests/integration_settings.py b/tests/integration_tests/integration_settings.py index 94d54f74..07a6d541 100644 --- a/tests/integration_tests/integration_settings.py +++ b/tests/integration_tests/integration_settings.py @@ -22,8 +22,11 @@ PLATFORM = 'lxd_container' INSTANCE_TYPE = None # Determines the base image to use or generate new images from. -# Can be the name of the OS if running a stock image, -# otherwise the id of the image being used if using a custom image +# +# This can be the name of an Ubuntu release, or in the format +# <image_id>[::<os>[::<release>]]. If given, os and release should describe +# the image specified by image_id. (Ubuntu releases are converted to this +# format internally; in this case, to "focal::ubuntu::focal".) OS_IMAGE = 'focal' # Populate if you want to use a pre-launched instance instead of |