summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2015-09-24 17:46:18 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2015-09-24 17:46:18 +0100
commite9f2de6f2a9ff522473cf0efaba04c22973a90e3 (patch)
treea5f9abaf7b9a204a82132db8345ee0424dd2b7dd
parent0a580c84382710bd9a4c598652c7f07a34df1966 (diff)
downloadciat-tester-e9f2de6f2a9ff522473cf0efaba04c22973a90e3.tar.gz
More hacking.
-rwxr-xr-xtester15
1 files changed, 15 insertions, 0 deletions
diff --git a/tester b/tester
index 58a04f2..e70e002 100755
--- a/tester
+++ b/tester
@@ -361,12 +361,23 @@ class ReleaseApp(cliapp.Application):
for system in self.systems:
self.systems[system].wait_for_ssh()
+ print('[Local] Building IP address prefix:')
+ ip_addrs = {}
+ for system in self.systems:
+ sanitised = 'IP__' + system.replace('-','_').upper()
+ ip_addrs[sanitised] = self.systems[system].ip_addr
+ prefix = ''
+ for entry in ip_addrs:
+ prefix = prefix + entry + '=' + ip_addrs[entry] + ' '
+ print(' ' + prefix)
+
for test in self.tests:
print('[Local] Running test: ' + test)
for step in self.tests[test]:
for cmd in step['commands']:
for system in step['systems']:
# TODO: Get user for each command from test file
+ # TODO: Pass prefix, so systems can talk to each other
s = self.systems[system]
s.runcmd(['sh', '-c', cmd], 'root')
@@ -375,6 +386,10 @@ class ReleaseApp(cliapp.Application):
for host in self.hosts:
self.hosts[host].cleanup_systems(self.images)
+ # Sleep for a bit, or nova silently fails to delete the image
+ # TODO: Test whether the image has been deleted in a retry loop.
+ time.sleep(20)
+
print('[Local] Remove images from remote hosts:')
for host in self.hosts:
self.hosts[host].delete_images(self.images)