Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
adding a test for local_exe that has a ready program, but no boot pro…
Browse files Browse the repository at this point in the history
…gram.

patching the bug that this test trips
  • Loading branch information
buzztroll committed Oct 5, 2012
1 parent f110305 commit 03ddd36
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cloudinitd/bootfabtasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions tests/plans/nobootpgm/ready.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

exit 0
5 changes: 5 additions & 0 deletions tests/plans/nobootpgm/test-level1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[svc-sampleservice]

hostname: localhost
local_exe: True
readypgm: ready.sh
22 changes: 22 additions & 0 deletions tests/plans/nobootpgm/top.conf
Original file line number Diff line number Diff line change
@@ -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.