From 8a8e1981f2189ba0ae3942625e93f495671c20ee Mon Sep 17 00:00:00 2001 From: Dominic Maraglia Date: Wed, 4 May 2011 14:19:57 -0700 Subject: adding test for ticket 7117 --- .../ticket_7117_broke_env_criteria_authconf.rb | 20 -------------------- .../ticket_7117_broke_env_criteria_authconf.rb | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 acceptance/pending/ticket_7117_broke_env_criteria_authconf.rb create mode 100644 acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb diff --git a/acceptance/pending/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/pending/ticket_7117_broke_env_criteria_authconf.rb deleted file mode 100644 index b45f91beb..000000000 --- a/acceptance/pending/ticket_7117_broke_env_criteria_authconf.rb +++ /dev/null @@ -1,20 +0,0 @@ -test_name "#7117 Broke the environment criteria in auth.conf" - -# curl -k -H "Accept: yaml" https://cent-55-64-1:8140/override/facts/cent-55-64-1.local - -# add to auth.conf -add_2_authconf = %q{ -path / -environment override -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 "Fetch agent facts from Puppet Master" -on agents, "curl -k -H \"Accept: yaml\" https://#{master}:8140/override/facts/cent-55-64-1.local" - -step "Restore original auth.conf file" -on master, "cp -f /tmp/auth.conf-7117 #{config['puppetpath']}/auth.conf" diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb new file mode 100644 index 000000000..bd0599d86 --- /dev/null +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -0,0 +1,22 @@ +test_name "#7117 Broke the environment criteria in auth.conf" + +# add to auth.conf +add_2_authconf = %q{ +path / +environment override +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 "Fetch agent facts from Puppet Master" +agents.each do |host| + on(host, "curl -k -H \"Accept: yaml\" https://#{master}:8140/override/facts/\`hostname -f\`") do + assert_match(/--- !ruby\/object:Puppet::Node::Facts/, stdout, "Agent Facts not returned for #{host}") + end +end + +step "Restore original auth.conf file" +on master, "cp -f /tmp/auth.conf-7117 #{config['puppetpath']}/auth.conf" -- cgit