diff options
author | James Falcon <james.falcon@canonical.com> | 2023-05-09 04:17:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 11:17:25 +0200 |
commit | b1a14a2a3245743adb960d9ae8c859bf1172feb1 (patch) | |
tree | 45bdbc20074decde6d2fc7c65c1844b1f66b7077 | |
parent | 4d28d203ff03dc4a4994ad223e769d2460f83a57 (diff) | |
download | cloud-init-git-b1a14a2a3245743adb960d9ae8c859bf1172feb1.tar.gz |
integration tests: fix image specification parsing (#2166)
-rw-r--r-- | tests/integration_tests/integration_settings.py | 2 | ||||
-rw-r--r-- | tests/integration_tests/releases.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration_tests/integration_settings.py b/tests/integration_tests/integration_settings.py index aca5bf91..6282def4 100644 --- a/tests/integration_tests/integration_settings.py +++ b/tests/integration_tests/integration_settings.py @@ -33,7 +33,7 @@ INSTANCE_TYPE: Optional[str] = None # Determines the base image to use or generate new images from. # # This can be the name of an Ubuntu release, or in the format -# <image_id>[::<os>[::<release>[::<version>]]. If given, os and release should +# <image_id>[::<os>::<release>::<version>]. 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 "None::ubuntu::focal::20.04".) OS_IMAGE = "focal" diff --git a/tests/integration_tests/releases.py b/tests/integration_tests/releases.py index b2ab9cee..45b0ffcc 100644 --- a/tests/integration_tests/releases.py +++ b/tests/integration_tests/releases.py @@ -66,7 +66,7 @@ class Release: """Get the individual parts from an OS_IMAGE definition. Returns a namedtuple containing id, os, and release of the image.""" - parts = os_image.split("::", 2) + parts = os_image.split("::", 3) if len(parts) == 1: image_id = None os = "ubuntu" @@ -77,7 +77,7 @@ class Release: else: raise ValueError( "OS_IMAGE must either contain release name or be in the form " - "of <image_id>[::<os>[::<release>[::<version>]]]" + "of <image_id>[::<os>::<release>::<version>]" ) return cls(os, series, version, image_id) |