Skip to content

Commit

Permalink
Expect curl to exit with code 0 in acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Aug 6, 2019
1 parent f2bac77 commit 7c05062
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/acceptance/foreman_basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ class { '::foreman':

describe command("curl -s --cacert /etc/foreman/certificate.pem https://#{host_inventory['fqdn']} -w '\%{redirect_url}' -o /dev/null") do
its(:stdout) { is_expected.to eq("https://#{host_inventory['fqdn']}/users/login") }
its(:exit_status) { is_expected.to eq 0 }
end
end
1 change: 1 addition & 0 deletions spec/acceptance/foreman_journald_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class { '::foreman':

describe command("curl -s --cacert /etc/foreman/certificate.pem https://#{host_inventory['fqdn']} -w '\%{redirect_url}' -o /dev/null") do
its(:stdout) { is_expected.to eq("https://#{host_inventory['fqdn']}/users/login") }
its(:exit_status) { is_expected.to eq 0 }
end

describe command("journalctl -u #{service_name}") do
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/foreman_prometheus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class { '::foreman':

describe command("curl -s --cacert /etc/foreman/certificate.pem https://#{host_inventory['fqdn']} -w '\%{redirect_url}' -o /dev/null") do
its(:stdout) { is_expected.to eq("https://#{host_inventory['fqdn']}/users/login") }
its(:exit_status) { is_expected.to eq 0 }
end

# TODO: actually verify prometheus functionality
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/foreman_statsd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class { '::foreman':

describe command("curl -s --cacert /etc/foreman/certificate.pem https://#{host_inventory['fqdn']} -w '\%{redirect_url}' -o /dev/null") do
its(:stdout) { is_expected.to eq("https://#{host_inventory['fqdn']}/users/login") }
its(:exit_status) { is_expected.to eq 0 }
end

# TODO: actually verify statsd functionality
Expand Down

0 comments on commit 7c05062

Please sign in to comment.