diff --git a/acceptance/tests/environment/use_agent_environment_when_no_enc.rb b/acceptance/tests/environment/use_agent_environment_when_no_enc.rb new file mode 100644 index 000000000..87be8b3e7 --- /dev/null +++ b/acceptance/tests/environment/use_agent_environment_when_no_enc.rb @@ -0,0 +1,30 @@ +test_name "Agent should use agent environment if there is no enc-specified environment" + +testdir = master.tmpdir('use_agent_env') + +create_remote_file master, "#{testdir}/puppet.conf", < "puppet:///amod/testy", +} + +notify { "mytemp is ${::mytemp}": } +END + on master, "chmod 644 #{testdir}/different.pp" + + run_agent_on(agent, "--no-daemonize --onetime --server #{master} --verbose") + on agent, "cat #{atmp}/special_testy" + assert_match(/special_environment/, stdout, "The file from environment 'special' was not found") + on agent, "rm -rf #{atmp}" + end +end + +on master, "rm -rf #{testdir}" diff --git a/acceptance/tests/environment/use_enc_environment_for_pluginsync.rb b/acceptance/tests/environment/use_enc_environment_for_pluginsync.rb new file mode 100644 index 000000000..d447daad0 --- /dev/null +++ b/acceptance/tests/environment/use_enc_environment_for_pluginsync.rb @@ -0,0 +1,41 @@ +test_name "Agent should use environment given by ENC for pluginsync" + +testdir = master.tmpdir('respect_enc_test') + +create_remote_file master, "#{testdir}/enc.rb", <