Permalink
Browse files

adding a test for the more than 1000 historical entries and a changel…

…og entry
  • Loading branch information...
1 parent df26459 commit 3c7381d6b69ac18a88a34d6fd4ce2b55356f755a BuzzTroll committed Apr 26, 2011
Showing with 62 additions and 0 deletions.
  1. +3 −0 cloud-client/nimbus-cloud-client-src/CHANGES.txt
  2. +59 −0 tests/cc-1000-test.py
@@ -17,6 +17,9 @@ nimbus-cloud-client-019
[*] Expand ~/ for cloud.properties options like nimbus.cert
https://github.com/nimbusproject/nimbus/issues/5
+[*] Fixed history tracking issue when more than 100 VMs are launched:
+ https://github.com/nimbusproject/nimbus/issues/45
+
nimbus-cloud-client-018
-----------------------
View
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+
+import pexpect
+import sys
+import os
+
+to=90
+cc_home=os.environ['CLOUD_CLIENT_HOME']
+logfile = sys.stdout
+
+os.mkdir("%s/history/vm-999" % (cc_home))
+
+cmd = "%s/bin/cloud-client.sh --transfer --sourcefile /etc/group" % (cc_home)
+(x, rc)=pexpect.run(cmd, withexitstatus=1)
+
+cmd = "%s/bin/cloud-client.sh --run --name group --hours .25" % (cc_home)
+child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
+rc = child.expect ('Running:')
+if rc != 0:
+ print "group not found in the list"
+ sys.exit(1)
+handle = child.readline().strip().replace("'", "")
+rc = child.expect(pexpect.EOF)
+if rc != 0:
+ print "run"
+ sys.exit(1)
+
+cmd = "%s/bin/cloud-client.sh --terminate --handle %s" % (cc_home, handle)
+print cmd
+(x, rc)=pexpect.run(cmd, withexitstatus=1)
+print x
+if rc != 0:
+ print "failed to terminate"
+ sys.exit(1)
+
+cmd = "%s/bin/cloud-client.sh --run --name group --hours .25" % (cc_home)
+child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
+rc = child.expect ('Running:')
+if rc != 0:
+ print "group not found in the list"
+ sys.exit(1)
+handle = child.readline().strip().replace("'", "")
+rc = child.expect(pexpect.EOF)
+if rc != 0:
+ print "run"
+ sys.exit(1)
+
+cmd = "%s/bin/cloud-client.sh --terminate --handle %s" % (cc_home, handle)
+print cmd
+(x, rc)=pexpect.run(cmd, withexitstatus=1)
+print x
+if rc != 0:
+ print "failed to terminate"
+ sys.exit(1)
+
+
+cmd = "%s/bin/cloud-client.sh --delete --name group" % (cc_home)
+(x, rc)=pexpect.run(cmd, withexitstatus=1)
+sys.exit(0)

0 comments on commit 3c7381d

Please sign in to comment.