diff --git a/testsuite/features/secondary/proxy_cobbler_pxeboot.feature b/testsuite/features/secondary/proxy_cobbler_pxeboot.feature index 4ce4285159ec..aa01e410f64d 100644 --- a/testsuite/features/secondary/proxy_cobbler_pxeboot.feature +++ b/testsuite/features/secondary/proxy_cobbler_pxeboot.feature @@ -72,11 +72,11 @@ Feature: PXE boot a terminal with Cobbler And I follow "Autoinstallation File" Then I should see a "SLE-15-SP4-TFTP" text - Scenario: Set up tftp installation + Scenario: Set up tftp installation and synchronize it When I configure tftp on the "server" And I start tftp on the proxy And I configure tftp on the "proxy" - And I synchronize the tftp configuration on the proxy with the server + And I run Cobbler sync with error checking Scenario: Restart squid so proxy.example.org is recognized When I restart squid service on the proxy diff --git a/testsuite/features/secondary/srv_cobbler_profile.feature b/testsuite/features/secondary/srv_cobbler_profile.feature new file mode 100644 index 000000000000..506e55495cf3 --- /dev/null +++ b/testsuite/features/secondary/srv_cobbler_profile.feature @@ -0,0 +1,39 @@ +# Copyright (c) 2023 SUSE LLC. +# Licensed under the terms of the MIT license. + +# TODO +# Switch the second Profile over to the first Distro +# Now during the cobbler sync there should be a ValueError in the Cobbler Log with the following error message: +# [] - INFO | Exception value: Child with the name "" of parent object "" did not exist! + + +# To detect the second bsc correctly one needs to account that the task ID is the identical one as the one you started. +# To be able to not destroy the whole sumaform deployment, it would be cool if this test has a very thorough cleanup in SUMA AND Cobbler. + +@scope_cobbler +Feature: Cobbler parent checks + Tests for occuring Cobbler issue (bsc#1207417) + + Scenario: Log in as testing user + Given I am authorized as "testing" with password "testing" + + Scenario: Create Cobbler distributions via the API + Given cobblerd is running + And I create distro "parent_distro1" as user "testing" with password "testing" + And I create distro "parent_distro2" as user "testing" with password "testing" + + Scenario: Create a Cobbler profile via the API + Given cobblerd is running + And distro "parent_distro1" exists + And distro "parent_distro2" exists + And I create profile "parent_profile1" for distro "parent_distro1" as user "testing" with password "testing" + And I create profile "parent_profile2" for distro "parent_distro2" 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: Execute a Cobbler sync + Given cobblerd is running + And I run Cobbler sync without error checking diff --git a/testsuite/features/secondary/srv_cobbler_profile_ise.feature b/testsuite/features/secondary/srv_cobbler_profile_ise.feature new file mode 100644 index 000000000000..1debf47ad69d --- /dev/null +++ b/testsuite/features/secondary/srv_cobbler_profile_ise.feature @@ -0,0 +1,31 @@ +# Copyright (c) 2023 SUSE LLC. +# Licensed under the terms of the MIT license. + +# TODO +# Use XML-RPC SUMA API setVariables; XML-RPC should return an error here + +@scope_cobbler +Feature: Cobbler editing profiles results in ISE + Tests for occuring Cobbler issue (bsc#1207532) + + Scenario: Log in as testing user + Given I am authorized as "testing" with password "testing" + + 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 + When I follow the left menu "Systems > Autoinstallation > Profiles" + Then I should see a "iseprofile" text + And I should see a "isedistro" text diff --git a/testsuite/features/step_definitions/cobbler_steps.rb b/testsuite/features/step_definitions/cobbler_steps.rb index 8ba36e9ecdb5..f8901fab73b4 100644 --- a/testsuite/features/step_definitions/cobbler_steps.rb +++ b/testsuite/features/step_definitions/cobbler_steps.rb @@ -224,7 +224,11 @@ raise 'File injection failed' unless return_codes.all?(&:zero?) end -When(/^I synchronize the tftp configuration on the proxy with the server$/) do - out, _code = $server.run('cobbler sync') - raise 'cobbler sync failed' if out.include? 'Push failed' +When(/^I run Cobbler sync (with|without) error checking$/) do |checking| + if checking == 'with' + out, _code = $server.run('cobbler sync') + raise 'cobbler sync failed' if out.include? 'Push failed' + else + _out, _code = $server.run('cobbler sync') + end end diff --git a/testsuite/run_sets/secondary.yml b/testsuite/run_sets/secondary.yml index ed1f055d61e3..111084b3fff4 100644 --- a/testsuite/run_sets/secondary.yml +++ b/testsuite/run_sets/secondary.yml @@ -57,4 +57,6 @@ - features/secondary/srv_rename_hostname.feature - features/secondary/proxy_as_pod_basic_tests.feature - features/secondary/srv_logfile.feature +- features/secondary/srv_cobbler_profile_ise.feature +- features/secondary/srv_cobbler_profile.feature ## Secondary features END ##