Skip to content
Browse files

adding a test for local_exe that has a ready program, but no boot pro…

…gram.

patching the bug that this test trips
  • Loading branch information...
1 parent f110305 commit 03ddd36791951754133c16d537ceab6110f9e32c @buzztroll buzztroll committed Oct 4, 2012
View
2 cloudinitd/bootfabtasks.py
@@ -80,7 +80,6 @@ def readypgm(pgm=None, args=None, stagedir=None, local_exe=None):
pgm_to_use = run
put_pgm = put
if local_exe:
- os.chdir(stagedir)
pgm_to_use = local
put_pgm = shutil.copy
@@ -91,6 +90,7 @@ def readypgm(pgm=None, args=None, stagedir=None, local_exe=None):
destpgm = "%s/%s" % (stagedir, relpgm)
if local_exe:
+ os.chdir(stagedir)
put_pgm(pgm, destpgm)
os.chmod(destpgm, 0755)
else:
View
3 tests/plans/nobootpgm/ready.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exit 0
View
5 tests/plans/nobootpgm/test-level1.conf
@@ -0,0 +1,5 @@
+[svc-sampleservice]
+
+hostname: localhost
+local_exe: True
+readypgm: ready.sh
View
22 tests/plans/nobootpgm/top.conf
@@ -0,0 +1,22 @@
+# this is a sample top level configuration file. each entry under runlevels
+# is a file with a single runlevel description. All of the services in that
+# file are run at the same time but the next level is not begun until
+# all of these services in the previous successfully complete.
+
+[defaults]
+iaas_key: env.CLOUDINITD_IAAS_ACCESS_KEY
+iaas_secret: env.CLOUDINITD_IAAS_SECRET_KEY
+iaas_url: env.CLOUDINITD_IAAS_URL
+
+
+image: env.CLOUDINITD_IAAS_IMAGE
+iaas: env.CLOUDINITD_IAAS_TYPE
+allocation: env.CLOUDINITD_IAAS_ALLOCATION
+sshkeyname: env.CLOUDINITD_IAAS_SSHKEYNAME
+localsshkeypath: env.CLOUDINITD_IAAS_SSHKEY
+ssh_username: env.CLOUDINITD_SSH_USERNAME
+securitygroups: default
+
+[runlevels]
+level1: test-level1.conf
+

0 comments on commit 03ddd36

Please sign in to comment.
Something went wrong with that request. Please try again.