From d132356cc361abef2d90d4073438f3ab759d5964 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 19 Apr 2021 11:31:28 -0500 Subject: fix error on upgrade caused by new vendordata2 attributes (#869) In #777, we added 'vendordata2' and 'vendordata2_raw' attributes to the DataSource class, but didn't use the upgrade framework to deal with an unpickle after upgrade. This commit adds the necessary upgrade code. Additionally, added a smaller-scope upgrade test to our integration tests that will be run on every CI run so we catch these issues immediately in the future. LP: #1922739 --- cloudinit/tests/test_upgrade.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cloudinit/tests') diff --git a/cloudinit/tests/test_upgrade.py b/cloudinit/tests/test_upgrade.py index 05eefd2a..da3ab23b 100644 --- a/cloudinit/tests/test_upgrade.py +++ b/cloudinit/tests/test_upgrade.py @@ -46,3 +46,7 @@ class TestUpgrade: def test_paths_has_run_dir_attribute(self, previous_obj_pkl): assert previous_obj_pkl.paths.run_dir is not None + + def test_vendordata_exists(self, previous_obj_pkl): + assert previous_obj_pkl.vendordata2 is None + assert previous_obj_pkl.vendordata2_raw is None -- cgit v1.2.3