Skip to content

Commit c88fda6

Browse files
committed
(maint) Reload puppetserver service on tests teardown
For tests that modify auth.conf, make sure we reload the puppetserver service after copying back the old auth.conf, otherwise subsequent tests may fail. For example, running `tests/agent/agent_parses_json_catalog.rb` after `allow_arbitrary_node_name_for_agent.rb` will fail without this change.
1 parent 2fde3e6 commit c88fda6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
teardown do
2626
modify_tk_config(master, options['puppetserver-config'], {'jruby-puppet' => {'use-legacy-auth-conf' => true}})
2727
on master, 'cp /etc/puppetlabs/puppetserver/conf.d/auth.bak /etc/puppetlabs/puppetserver/conf.d/auth.conf'
28+
on master, "service #{master['puppetservice']} reload"
2829
end
2930

3031
step "Setup tk-auth rules" do

acceptance/tests/allow_arbitrary_node_name_for_agent.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
teardown do
1818
on master, 'cp /etc/puppetlabs/puppetserver/conf.d/auth.bak /etc/puppetlabs/puppetserver/conf.d/auth.conf'
1919
modify_tk_config(master, options['puppetserver-config'], {'jruby-puppet' => {'use-legacy-auth-conf' => true}})
20+
on master, "service #{master['puppetservice']} reload"
2021
end
2122

2223
step "Setup tk-auth rules" do

0 commit comments

Comments
 (0)