summaryrefslogtreecommitdiff
path: root/tests/integration_tests/test_upgrade.py
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2021-10-19 14:58:56 -0500
committerGitHub <noreply@github.com>2021-10-19 13:58:56 -0600
commit150fd30ef81cea5c2b0aff5127e33a5db786aa09 (patch)
treeaa81b4d150335464760d6db6b14c195030913ae3 /tests/integration_tests/test_upgrade.py
parentee296ced9c0a61b1484d850b807c601bcd670ec1 (diff)
downloadvyos-cloud-init-150fd30ef81cea5c2b0aff5127e33a5db786aa09.tar.gz
vyos-cloud-init-150fd30ef81cea5c2b0aff5127e33a5db786aa09.zip
Update Azure _unpickle (SC-500) (#1067)
When self.failed_desired_api_version was added to DataSourceAzure, the attribute was never added to the _unpickle method using the upgrade framework. This commit adds the attribute. LP: #1946644
Diffstat (limited to 'tests/integration_tests/test_upgrade.py')
-rw-r--r--tests/integration_tests/test_upgrade.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py
index e90a5f9d..0ba4754c 100644
--- a/tests/integration_tests/test_upgrade.py
+++ b/tests/integration_tests/test_upgrade.py
@@ -84,11 +84,8 @@ def test_clean_boot_of_upgraded_package(session_cloud: IntegrationCloud):
'There were errors/warnings/tracebacks pre-upgrade. '
'Any failures may be due to pre-upgrade problem')
- # Upgrade and reboot
+ # Upgrade
instance.install_new_cloud_init(source, take_snapshot=False)
- instance.execute('hostname something-else')
- instance.restart()
- assert instance.execute('cloud-init status --wait --long').ok
# 'cloud-init init' helps us understand if our pickling upgrade paths
# have broken across re-constitution of a cached datasource. Some
@@ -96,6 +93,11 @@ def test_clean_boot_of_upgraded_package(session_cloud: IntegrationCloud):
# it here to ensure we get a dirty run.
assert instance.execute('cloud-init init').ok
+ # Reboot
+ instance.execute('hostname something-else')
+ instance.restart()
+ assert instance.execute('cloud-init status --wait --long').ok
+
# get post values
post_hostname = instance.execute('hostname')
post_cloud_id = instance.execute('cloud-id')