summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2021-01-19 12:40:16 -0500
committerGitHub <noreply@github.com>2021-01-19 12:40:16 -0500
commitc25118acc7542e93ccc56a0cc34f32c24b0e1044 (patch)
tree6091381ad5a59ee9c24dc328a7be6a28490209d5
parentcdc5b81f33aee0ed3ef1ae239e5cec1906d0178a (diff)
downloadvyos-cloud-init-c25118acc7542e93ccc56a0cc34f32c24b0e1044.tar.gz
vyos-cloud-init-c25118acc7542e93ccc56a0cc34f32c24b0e1044.zip
integration_tests: log image serial if available (#772)
Ubuntu cloud images ship /etc/cloud/build.info which includes a line with the build serial used to identify the image: serial: 20210108 This is valuable information when verifying Ubuntu issues (to confirm that testing is happening against the expected image), but is also useful when debugging test failures: manifests of all packages in (the base) images can be found at http://cloud-images.ubuntu.com/
-rw-r--r--tests/integration_tests/clouds.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/integration_tests/clouds.py b/tests/integration_tests/clouds.py
index 72d77058..fc0a61d5 100644
--- a/tests/integration_tests/clouds.py
+++ b/tests/integration_tests/clouds.py
@@ -173,6 +173,9 @@ class IntegrationCloud(ABC):
'cloud-init version: %s',
instance.execute("cloud-init --version")
)
+ serial = instance.execute("grep serial /etc/cloud/build.info")
+ if serial:
+ log.info('image serial: %s', serial.split()[1])
return instance
def get_instance(self, cloud_instance, settings=integration_settings):