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

Improve cucumber test based on container requirements #7366

Closed
Closed
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
3 changes: 1 addition & 2 deletions testsuite/features/core/allcli_sanity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Feature: Sanity checks
I want to be sure to use a sane environment

Scenario: The server is healthy
Then "server" should have a FQDN
And reverse resolution should work for "server"
Then reverse resolution should work for "server"
And the clock from "server" should be exact
And service "apache2" is enabled on "server"
And service "apache2" is active on "server"
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@

When(/^I fetch "([^"]*)" to "([^"]*)"$/) do |file, host|
node = get_target(host)
node.run("wget http://#{$server.full_hostname}/#{file}")
node.run("curl -s -O http://#{$server.full_hostname}/#{file}")
end

When(/^I wait until file "([^"]*)" contains "([^"]*)" on server$/) do |file, content|
Expand Down
3 changes: 1 addition & 2 deletions testsuite/features/step_definitions/navigation_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,8 @@
system_name = get_system_name(host)
rescue
raise "Host #{host} not found" if if_present.empty?

log "Host #{host} is not deployed, not trying to select it"
return
next
end
step %(I select "#{system_name}" from "#{field}")
end
Expand Down
9 changes: 2 additions & 7 deletions testsuite/features/support/twopence_init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,8 @@ def get_system_name(host)
when 'containerized_proxy'
system_name = $proxy.full_hostname.sub('pxy', 'pod-pxy')
else
begin
node = get_target(host)
system_name = node.full_hostname
rescue RuntimeError
# If the node for that host is not defined, just return the host parameter as system_name
system_name = host
end
node = get_target(host)
system_name = node.full_hostname
end
system_name
end
Expand Down
Loading