summaryrefslogtreecommitdiffstats
path: root/acceptance/tests
diff options
context:
space:
mode:
authorDominic Maraglia <dmaraglia@gmail.com>2011-05-04 14:19:57 -0700
committerDominic Maraglia <dmaraglia@gmail.com>2011-05-04 14:19:57 -0700
commit8a8e1981f2189ba0ae3942625e93f495671c20ee (patch)
tree8440224563d44d6c29230e580e6d4ec1f6a9321e /acceptance/tests
parent4533aa16ec8c9ea4db2fc7de75b01ea056bcf624 (diff)
adding test for ticket 7117
Diffstat (limited to 'acceptance/tests')
-rw-r--r--acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb22
1 files changed, 22 insertions, 0 deletions
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"