diff --git a/testsuite/features/secondary/srv_cobbler_profile_ise.feature b/testsuite/features/secondary/srv_cobbler_profile_ise.feature index 1fcc7559ad6e..9cf53fb9e342 100644 --- a/testsuite/features/secondary/srv_cobbler_profile_ise.feature +++ b/testsuite/features/secondary/srv_cobbler_profile_ise.feature @@ -12,27 +12,61 @@ Feature: Cobbler editing profiles results in ISE Scenario: Copy cobbler profiles on the server When I copy autoinstall mocked files on server - Scenario: Create a Cobbler distribution via the API - Given cobblerd is running - When I create distro "isedistro" as user "testing" with password "testing" + Scenario: Create a Cobbler distribution via the UI + When I follow the left menu "Systems > Autoinstallation > Distributions" + And I follow "Create Distribution" + When I enter "isedistro_ui" as "label" + And I enter "/var/autoinstall/Fedora_12_i386/" as "basepath" + And I select "Fedora" from "installtype" + And I click on "Create Autoinstallable Distribution" + Then I should see a "Autoinstallable Distributions" text + And I should see a "isedistro_ui" link - Scenario: Create a Cobbler profile via the API - Given cobblerd is running - And distro "isedistro" exists - When I create profile "iseprofile" for distro "isedistro" as user "testing" with password "testing" + Scenario: Create a Cobbler profile via the UI + When I follow the left menu "Systems > Autoinstallation > Profiles" + And I follow "Create Kickstart Profile" + When I enter "iseprofile_ui" as "kickstartLabel" + And I click on "Next" + And I click on "Next" + And I enter "linux" as "rootPassword" + And I enter "linux" as "rootPasswordConfirm" + And I click on "Finish" + Then I should see a "Autoinstallation: iseprofile_ui" text + And I should see a "Autoinstallation Details" link + + # Scenario: Create a Cobbler distribution via the API + # Given cobblerd is running + # When I create distro "isedistro" as user "testing" with password "testing" + + # Scenario: Create a Cobbler profile via the API + # Given cobblerd is running + # And distro "isedistro" exists + # When I create profile "iseprofile" for distro "isedistro" as user "testing" with password "testing" Scenario: Create a Cobbler system via the API Given cobblerd is running And profile "iseprofile" exists When I create system "isesystem" for profile "iseprofile" as user "testing" with password "testing" - Scenario: Check Cobbler created distro and profile + Scenario: Check Cobbler created distro and profile via the UI When I follow the left menu "Systems > Autoinstallation > Profiles" Then I should see a "iseprofile" text And I should see a "isedistro" text - Scenario: Change variables - # TODO: Use XML-RPC SUMA API setVariables + Scenario: Change profile variables using the UI + # TODO: + + Scenario: Create a Cobbler distribution via the XML-RPC API + # TODO: + + Scenario: Create a Cobbler profile via the XML-RPC API + # TODO: + + Scenario: Create a Cobbler system via the XML-RPC API + # TODO: + And I create a system record + + Scenario: Change profile variables using the XML-RPC API # XML-RPC should return an error here And I set the following variables for the kickstart profile "fedora_kickstart_profile" | inst.repo | http://127.0.0.1 | diff --git a/testsuite/features/step_definitions/api_common.rb b/testsuite/features/step_definitions/api_common.rb index 21525cedc0f8..08aa33c0b03d 100644 --- a/testsuite/features/step_definitions/api_common.rb +++ b/testsuite/features/step_definitions/api_common.rb @@ -569,7 +569,7 @@ def wait_action_complete(actionid, timeout: DEFAULT_TIMEOUT) assert($output.select { |p| p['name'] == profile_name }.count == 1) end -When(/^I set the following variables for the kickstart profile "([^"]*)"$/) do |profile, values| +When(/^I set the following variables for the kickstart profile "([^"]*)" via XML-RPC$/) do |profile, values| # this works only with a 2 column table where the key is in the left column variables = values.rows_hash _command = $api_test.kickstart.profile.set_variables(profile, variables) diff --git a/testsuite/features/support/namespaces/kickstart.rb b/testsuite/features/support/namespaces/kickstart.rb index f12f9a77c867..ec49ba0138c5 100644 --- a/testsuite/features/support/namespaces/kickstart.rb +++ b/testsuite/features/support/namespaces/kickstart.rb @@ -29,6 +29,34 @@ def initialize(api_test) @test = api_test end + ## + # Create a new kickstart profile using the default download URL for the kickstartable tree and kickstart host + # specified. + # * @param profileLabel Label for the new kickstart profile. + # * @param virtualizationType Virtualization type, or none. + # * @param kickstartableTreeLabel Label of a kickstartable tree. + # * @param kickstartHost Kickstart hostname (of a server or proxy) used to + # * construct the default download URL for the new kickstart profile. + # * @param rootPassword Root password. + # * @param updateType Set the automatic ks tree update strategy + # * for the profile. Valid choices are "none" or "all". + # Args: + # profile: The name of the kickstart profile + # variables: A list of variables to set + def create_profile(profile, variables) + @test.call('kickstart.profile.createProfile', sessionKey: @test.token, ksLabel: profile, variables: variables) + end + + ## + # Associates list of kickstart variables with the specified kickstart profile + # + # Args: + # profile: The name of the kickstart profile + # variables: A list of variables to set + def set_variables(profile, variables) + @test.call('kickstart.profile.setVariables', sessionKey: @test.token, ksLabel: profile, variables: variables) + end + ## # Associates list of kickstart variables with the specified kickstart profile #