diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-06-09 15:44:49 -0700 |
---|---|---|
committer | Nick Lewis <nick@puppetlabs.com> | 2011-06-09 15:48:32 -0700 |
commit | 4af97845453f9e4762a1743ba8e29316ef372f31 (patch) | |
tree | e9202b80f0b1d5484536fa37e8289189b892f870 /acceptance | |
parent | ecde13449aab95cba22103075a362cfeb91b4ec0 (diff) | |
download | puppet-4af97845453f9e4762a1743ba8e29316ef372f31.tar.gz puppet-4af97845453f9e4762a1743ba8e29316ef372f31.tar.xz puppet-4af97845453f9e4762a1743ba8e29316ef372f31.zip |
(#7117) Use a different auth.conf instead of overwriting the default
This test was previously replacing the default auth.conf with its own, and
restoring it afterward. This was error-prone, failing if there wasn't an
initial auth.conf present. It would also causing cascading failures when this
test failed, by leaving a non-standard auth.conf for other tests to use. Since
this copy-and-restore behavior can be replaced by simply specifying a different
auth file to use, we do that instead.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
Diffstat (limited to 'acceptance')
-rw-r--r-- | acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb index 55c13370d..bc1ec9ce9 100644 --- a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -8,10 +8,10 @@ auth any allow * } -step "Save original auth.conf file and create a temp auth.conf" -on master, "cp #{config['puppetpath']}/auth.conf /tmp/auth.conf-7117; echo '#{add_2_authconf}' > #{config['puppetpath']}/auth.conf" +step "Create a temp auth.conf" +create_remote_file master, "/tmp/auth.conf-7117", add_2_authconf -with_master_running_on(master, "--certdnsnames=\"puppet:$(hostname -s):$(hostname -f)\" --verbose --noop") do +with_master_running_on(master, "--certdnsnames=\"puppet:$(hostname -s):$(hostname -f)\" --rest_authconfig /tmp/auth.conf-7117 --verbose --noop") do # Run test on Agents step "Run agent to upload facts" on agents, puppet_agent("--test --server #{master}") @@ -23,6 +23,3 @@ with_master_running_on(master, "--certdnsnames=\"puppet:$(hostname -s):$(hostnam end end end - -step "Restore original auth.conf file" -on master, "cp -f /tmp/auth.conf-7117 #{config['puppetpath']}/auth.conf" |