Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FM-5839) Ensure server is set for all actions #194

Merged
merged 1 commit into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ class { 'puppet_agent': service_names => [] }
it 'should work idempotently with no errors' do
with_puppet_running_on(master, server_opts, master.tmpdir('puppet')) do
# Run it twice and test for idempotency
on default, puppet("agent --test --server #{master}"), { :acceptable_exit_codes => [0,2] }
on default, puppet("agent --test"), { :acceptable_exit_codes => [0,2] }
configure_agent_on default, true
# We're after idempotency so allow exit code 0 only
on default, puppet("agent --test --server #{master}"), { :acceptable_exit_codes => [0] }
on default, puppet("agent --test"), { :acceptable_exit_codes => [0] }
end
end

Expand Down Expand Up @@ -162,10 +162,10 @@ class { 'puppet_agent': service_names => [] }
it 'should work idempotently with no errors' do
with_puppet_running_on(master, server_opts, master.tmpdir('puppet')) do
# Run it twice and test for idempotency
on default, puppet("agent --test --server #{master}"), { :acceptable_exit_codes => [0,2] }
on default, puppet("agent --test"), { :acceptable_exit_codes => [0,2] }
configure_agent_on default, true
# We're after idempotency so allow exit code 0 only
on default, puppet("agent --test --server #{master}"), { :acceptable_exit_codes => [0] }
on default, puppet("agent --test"), { :acceptable_exit_codes => [0] }
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def install_modules_on(host)
end
end

def parser_opts
def parser_opts(master_fqdn)
# Configuration only needed on 3.x master
{
:main => {:stringify_facts => false, :parser => 'future', :color => 'ansi'},
:agent => {:stringify_facts => false, :cfacter => true, :ssldir => '$vardir/ssl'},
:agent => {:stringify_facts => false, :cfacter => true, :ssldir => '$vardir/ssl', :server => master_fqdn},
}
end

Expand All @@ -103,7 +103,7 @@ def setup_puppet_on(host, opts = {})
configure_defaults_on host, 'foss'
install_puppet_on host, :version => ENV['PUPPET_CLIENT_VERSION'] || '3.8.6'

configure_puppet_on(host, parser_opts)
configure_puppet_on(host, parser_opts(master.to_s))

if opts[:mcollective]
install_package host, 'mcollective'
Expand Down