From 1427608f00045f7627d5b24306c6ae53b4f36f56 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 14 Feb 2014 17:56:02 +0000 Subject: Allow changing version label of deployment --- test_trove_upgrades.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test_trove_upgrades.py b/test_trove_upgrades.py index 55f4c08..ea95b91 100644 --- a/test_trove_upgrades.py +++ b/test_trove_upgrades.py @@ -298,7 +298,8 @@ class TroveUpgrade(Deployment): '%s.AUTOSTART=yes' % self.vm_name], cwd=self.branch.branch_dir) - def create_config(self, initial_deployment, upgrade_method='ssh-rsync'): + def create_config(self, initial_deployment, upgrade_method='ssh-rsync', + version_label='trove-current'): self.ensure_configure_extension_enabled('install-files') if upgrade_method == 'ssh-rsync': @@ -308,10 +309,12 @@ class TroveUpgrade(Deployment): self.create_trove_upgrade_morph( initial_deployment, - upgrade_method=upgrade_method, location=location) + upgrade_method=upgrade_method, location=location, + version_label=version_label) def create_trove_upgrade_morph( - self, initial_deployment, upgrade_method=None, location=None): + self, initial_deployment, upgrade_method, location, + version_label): ''' FIXME: this is totally wrong! @@ -349,7 +352,7 @@ class TroveUpgrade(Deployment): system_config = deploy_morph['systems'][0]['deploy'][self.vm_name] system_config['type'] = upgrade_method system_config['location'] = location - system_config['VERSION_LABEL'] = 'trove-current' + system_config['VERSION_LABEL'] = version_label write_file(deploy_morph_file, yaml.dump(deploy_morph)) @@ -555,7 +558,8 @@ class TestUpgrades(BaseTestSuite): print "Lighttpd outout: %s" % old_lighttpd_output upgrade = TroveUpgrade(branch, vm_name) - upgrade.create_config(instance, upgrade_method='ssh-rsync') + upgrade.create_config(instance, upgrade_method='ssh-rsync', + version_label='trove-current') upgrade.run_build() upgrade.run_deploy() @@ -700,7 +704,7 @@ class SimpleTestRunner(cliapp.Application): self.run_test() def run_test(self): - test = TestUpgrades().test_scenario_trove_upgrade_shared_user_data + test = TestUpgrades().test_scenario_trove_upgrade if self.settings['reuse-fixture'] is not None: fixture_dir = self.settings['reuse-fixture'] -- cgit v1.2.1