Skip to content

Commit

Permalink
(PUP-3277) Fix two acceptance tests
Browse files Browse the repository at this point in the history
The changes brought in for PUP-3277 were tested with PE, but running
them in our CI brought up several issues, one of which due to the Beaker
create_tmpdir_for_user method not working on windows, and the other
surfacing in use_enc_environment_for_files because directory
environments do not pick up module file changes and the test was
assuming it could change the module manifest on the master and have it
picked up by different agent runs.

Switched to manually chowning the tmpdir with a puppet apply for the
first problem, and setting environment_timeout to 0 for the latter.
  • Loading branch information
jpartlow committed Oct 2, 2014
1 parent a926a97 commit 9a95498
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Expand Up @@ -37,11 +37,11 @@
master_opts = {
'main' => {
'environmentpath' => "#{testdir}/environments",
'environment_timeout' => 0,
},
'master' => {
'node_terminus' => 'exec',
'external_nodes' => "#{testdir}/enc.rb",
'filetimeout' => 1
},
}

Expand All @@ -59,8 +59,6 @@
END
on master, "chmod 644 #{testdir}/environments/special/manifests/different.pp"

sleep 2 # Make sure the master has time to reload the file

run_agent_on(agent, "--no-daemonize --onetime --server #{master} --verbose --trace")

on agent, "cat #{atmp}/special_testy" do |result|
Expand Down
11 changes: 10 additions & 1 deletion acceptance/tests/ssl/autosign_command.rb
Expand Up @@ -15,7 +15,16 @@ def assert_key_generated(name)
test_certnames = []

step "Generate tmp dirs on all hosts" do
hosts.each { |host| testdirs[host] = create_tmpdir_for_user(host, 'autosign_command') }
hosts.each do |host|
testdirs[host] = host.tmpdir('autosign_command')
apply_manifest_on(host, <<-MANIFEST, :catch_failures => true)
file { '#{testdirs[host]}':
ensure => directory,
owner => #{host.puppet['user']},
mode => "0770",
}
MANIFEST
end
end

teardown do
Expand Down

0 comments on commit 9a95498

Please sign in to comment.