Permalink
Browse files

more changes for real tests

  • Loading branch information...
1 parent 218b2f3 commit b04e0a59bc3a6b69b2c8deac15f5e61288a5452d @buzztroll buzztroll committed Nov 29, 2011
Showing with 18 additions and 9 deletions.
  1. +5 −0 tests/cc-nimbusAdminList-test.py
  2. +13 −9 tests/cc-nimbusAdminShutdown-test.py
@@ -27,6 +27,11 @@
print "The directory already exists"
pass
+cmd = "%s/bin/nimbus-admin --shutdown --all" % (nimbus_home)
+print cmd
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
+
+
cmd = "%s/bin/nimbus-list-users %%" % (nimbus_home)
(x, rc)=pexpect.run(cmd, withexitstatus=1, timeout=to)
print x
@@ -73,6 +73,10 @@ def assert_vms():
print "The directory already exists"
pass
+cmd = "%s/bin/nimbus-admin --shutdown --all" % (nimbus_home)
+print cmd
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
+
cmd = "%s/bin/cloud-client.sh --transfer --sourcefile %s" % (cc_home, tst_image_src)
(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
@@ -121,16 +125,16 @@ def assert_vms():
id = start_vm()
assert_vms()
+if 'NIMBUS_TEST_MODE_REAL' not in os.environ:
+ cmd = "%s/bin/nimbus-admin --shutdown --gid 1" % (nimbus_home)
+ print cmd
+ (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
+ print x
+ if rc != 0:
+ print "error gid %s" % (cmd)
+ sys.exit(1)
-cmd = "%s/bin/nimbus-admin --shutdown --gid 1" % (nimbus_home)
-print cmd
-(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
-print x
-if rc != 0:
- print "error gid %s" % (cmd)
- sys.exit(1)
-
-assert_no_vms()
+ assert_no_vms()
id = start_vm()
assert_vms()

0 comments on commit b04e0a5

Please sign in to comment.