Allow different workaround files per series
This commit is contained in:
@@ -38,6 +38,11 @@ class SeriesUpgradeTest(unittest.TestCase):
|
||||
cls.lts = LTSGuestCreateTest()
|
||||
cls.from_series = None
|
||||
cls.to_series = None
|
||||
# While there are packaging upgrade bugs we need to be cheeky and
|
||||
# workaround by using the new package's version of files
|
||||
cls.workaround_script = "/home/ubuntu/package-workarounds.sh"
|
||||
cls.src_workaround_script = os.path.basename(cls.workaround_script)
|
||||
cls.files = []
|
||||
|
||||
def validate_pre_series_upgrade_cloud(self):
|
||||
"""Validate pre series upgrade."""
|
||||
@@ -49,13 +54,6 @@ class SeriesUpgradeTest(unittest.TestCase):
|
||||
# Set Feature Flag
|
||||
os.environ["JUJU_DEV_FEATURE_FLAGS"] = "upgrade-series"
|
||||
|
||||
# While there are packaging upgrade bugs we need to be cheeky and
|
||||
# workaround by using the new package's version of files
|
||||
workaround_script = "/home/ubuntu/package-workarounds.sh"
|
||||
src_workaround_script = os.path.basename(workaround_script)
|
||||
|
||||
files = [src_workaround_script, 'corosync', 'corosync.conf']
|
||||
|
||||
applications = model.get_status().applications
|
||||
for application in applications:
|
||||
# Defaults
|
||||
@@ -86,8 +84,8 @@ class SeriesUpgradeTest(unittest.TestCase):
|
||||
from_series=self.from_series,
|
||||
to_series=self.to_series,
|
||||
origin=origin,
|
||||
workaround_script=workaround_script,
|
||||
files=files)
|
||||
workaround_script=self.workaround_script,
|
||||
files=self.files)
|
||||
|
||||
def validate_series_upgraded_cloud(self):
|
||||
"""Validate post series upgrade."""
|
||||
@@ -101,10 +99,11 @@ class TrustyXenialSeriesUpgrade(SeriesUpgradeTest):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Run setup for Trusty to Xenial Series Upgrades."""
|
||||
cli_utils.setup_logging()
|
||||
cls.lts = LTSGuestCreateTest()
|
||||
super(TrustyXenialSeriesUpgrade, cls).setUpClass()
|
||||
cls.from_series = "trusty"
|
||||
cls.to_series = "xenial"
|
||||
cls.files = [cls.src_workaround_script,
|
||||
'corosync', 'corosync.conf']
|
||||
|
||||
|
||||
class XenialBionicSeriesUpgrade(SeriesUpgradeTest):
|
||||
@@ -113,10 +112,11 @@ class XenialBionicSeriesUpgrade(SeriesUpgradeTest):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Run setup for Xenial to Bionic Series Upgrades."""
|
||||
cli_utils.setup_logging()
|
||||
cls.lts = LTSGuestCreateTest()
|
||||
super(XenialBionicSeriesUpgrade, cls).setUpClass()
|
||||
cls.from_series = "xenial"
|
||||
cls.to_series = "bionic"
|
||||
cls.files = [cls.src_workaround_script,
|
||||
'corosync', 'corosync.conf', 'haproxy.cfg']
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user