summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-14 17:56:02 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-14 17:56:02 +0000
commit1427608f00045f7627d5b24306c6ae53b4f36f56 (patch)
tree3faa134b3e19b28cb37bdc1ba6dbab5cbb7a8f17
parentfeef45bb2f483ae2a2ccf37839833430b998d624 (diff)
downloadsystem-tests-1427608f00045f7627d5b24306c6ae53b4f36f56.tar.gz
Allow changing version label of deployment
-rw-r--r--test_trove_upgrades.py16
1 files 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']