Skip to content

Commit

Permalink
Choose correct profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Bischoff authored and admd committed Jun 5, 2024
1 parent 50fca4f commit f3f9064
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
9 changes: 7 additions & 2 deletions testsuite/features/secondary/srv_cobbler_distro.feature
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,13 @@ Feature: Cobbler and distribution autoinstallation
And I wait until file "/srv/tftpboot/pxelinux.0" exists on server

Scenario: Trigger the creation of a cobbler system record
When I trigger cobbler system record on the "sle_minion"
And I wait until file "/srv/tftpboot/pxelinux.cfg/01-*" contains "inst.ks=" on server
When I clear the caches on the server
And I am on the Systems overview page of this "sle_minion"
And I follow "Provisioning"
And I click on profile "testprofile"
And I click on "Create PXE installation configuration"
Then I should see a "System record created" text
And I wait until file "/srv/tftpboot/pxelinux.cfg/01-*" contains "autoyast=" on server

Scenario: Create a cobbler system record via API
When I create a system record
Expand Down
21 changes: 8 additions & 13 deletions testsuite/features/step_definitions/cobbler_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,14 @@
end

# cobbler reports
When(/^I trigger cobbler system record on the "([^"]*)"$/) do |host|
space = 'spacecmd -u admin -p admin'
get_target('server').run("#{space} clear_caches")
out, _code = get_target('server').run("#{space} system_details #{get_target(host).full_hostname}")
unless out.include? 'ssh-push-tunnel'
steps %(
Given I am authorized as "testing" with password "testing"
And I am on the Systems overview page of this "#{host}"
And I follow "Provisioning"
And I click on "Create PXE installation configuration"
Then I should see a "System record created" text
)
end
When(/^I clear the caches on the server$/) do
node = get_target('server')
node.run('spacecmd -u admin -p admin clear_caches')
end

When(/I click on profile "([^"]*)"$/) do |profile|
xpath_query = "//a[text()='#{profile}']/../../td[1]/input[@type='radio']"
find(:xpath, xpath_query).click
end

Then(/^the cobbler report should contain "([^"]*)" for "([^"]*)"$/) do |text, host|
Expand Down

0 comments on commit f3f9064

Please sign in to comment.