-
Notifications
You must be signed in to change notification settings - Fork 269
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
Rework zypper_lr
to actually check repositories
#1495
Conversation
I would be more interested in a staging and a TW scenario |
validatelr( | ||
{ | ||
product => $base_product, | ||
product_channel => check_var('SCC_REGISTER', 'installation') ? "Pool" : undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are already within check_var('SCC_REGISTER')
so why?
inline + what coolo said |
5095f8e
to
fa75a6f
Compare
New verification run: http://assam.suse.cz/tests/1674#step/zypper_lr/29. |
Is there some table similar to this one https://wiki.microfocus.net/index.php?title=SLE12_SP2_Channels_Checking_Table but for openSUSE? |
neither staging nor TW register the installation. The URLs are coming from control.xml - so zypper lr should be pretty static and you don't need that huge table. |
my (%h_addons, %h_addonurl, %h_scc_addons); | ||
my @addons_keys = split(/,/, get_var('ADDONS')); | ||
my @addonurl_keys = split(/,/, get_var('ADDONURL')); | ||
my @scc_addons_keys = split(/,/, get_var('SCC_ADDONS')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three will produce undef warnings when those vars are not set. Either use get_required_var
if job should fail or get_var('ADDONS', '')
.
fa75a6f
to
a51eb3f
Compare
a51eb3f
to
b882e9f
Compare
I believe the requested changes are implemented, please review. |
b882e9f
to
9cc8b36
Compare
Updated to correctly handle SLE SCC addons "streams" ("Pool", "Updates", ...). |
@@ -3,3 +3,5 @@ requires 'File::Basename'; | |||
requires 'Data::Dumper'; | |||
requires 'XML::Writer'; | |||
requires 'IO::File'; | |||
requires 'XML::LibXML'; | |||
requires 'XML::LibXML::XPathContext'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you are not actually using these in the context of the driver, only within the SUT so this shouldn't be required, right?
I wouldn't have that the test would need to be that complicated 😟 |
9cc8b36
to
ff9de47
Compare
LGTM, @coolo? |
that's a hell of a test. I don't even know how I would review what it does on maintenance. So the chances that this breaks somewhere if we merge it are pretty high, no? |
perhaps it makes sense to leave the zypper_lr for documentation purposes as is and only cherry-pick when to run this one? |
elsif (check_var('DISTRI', 'opensuse')) { | ||
if ($product eq "openSUSE-Leap-42.1-Source-Non-Oss") { | ||
script_run "zypper lr -d | grep \"$alias.*$product *| $enabled_repo.*$uri\""; | ||
record_soft_failure 'boo#988736'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is little point in record_soft_failure here. The bug is on the installation medium of 42.1 and won't be fixed there - so having this as soft_fail now only makes sure we will never have a green 42.1 update test
what about not overwriting the original test but put it into an extra branch which we call in the test development job group and gather some experience with it first? |
ff9de47
to
af6c086
Compare
Updated to avoid some odd corner cases. I believe it covers PR#11460 (FATE#320494) now. Yes, the test will likely break until it's proven on real setups we use. Would be great if there's a way how to see it running with a wide setup and not breaking much stuff. |
Well, as I told. This is called feature switch and it is what we also kinda use with the uppercase variables in the tests, e.g. you could add "EXTENDED_ZYPPER_LR_VALIDATION" and we add one test_suite to openQA which we include as part of test development. Of course, as always the challenge with feature toggles is that we need to keep track of its use, assign a feature toggle responsible (that would be you in this case) or at best avoid it by introducing changes incrementally, as Martin Fowler said: "feature toggle is the second-best solution. The best solution is to find a way to gradually integrate without feature toggles" |
af6c086
to
d0ae7d5
Compare
549dd5c
to
6095cec
Compare
PR#11708 Before `zypper_lr` test case just listed zypper repositories. Now the test case makes sure repositories which should be present are actually there. SLES/SLED base products are supported, so are addons (those defined by ADDONS, ADDONURL, and SCC_ADDONS variables) with Pool nad Updates SCC channels if defined by SCC_ADDONS. Verification runs: - Tumbleweed: http://assam.suse.cz/tests/1841#step/zypper_lr/37 - Leap 42.1: http://assam.suse.cz/tests/1839#step/zypper_lr/51 - Leap 42.2: http://assam.suse.cz/tests/1843#step/zypper_lr/47 - SLES JeOS: http://assam.suse.cz/tests/1845#step/zypper_lr/27 Server-DVD-HA + GEO with SCC channels: http://assam.suse.cz/tests/1830#step/zypper_lr/55 PR#11460 (FATE#320494) This test case also verifies following test cases from FATE#320494: Test case os-autoinst#1: not registered system 1. Install but do not register the system. 2. After the installation, type 3. zypper lr and check that the source corresponding to the CD/DVD is enabled. Test case os-autoinst#2: registered system + addon 1. Register the system during the installation. 2. Enable the SDK add-on during the registration (in the "Available Extensions and Modules" screen). 3. After the installation, type zypper lr and check that the source corresponding to the CD/DVD is disabled (but it's still there). Test case os-autoinst#3: registered system + not registered addon 1. Register the system during the installation. 2. Add the SDK add-on using a CD/DVD/USB stick (through the "Add-on Product" screen). 3. After the installation, type zypper lr and check that the source corresponding to the CD/DVD is disabled (but it's still there) and the source corresponding to the SDK add-on is enabled.
6095cec
to
3cc024e
Compare
ok. You invested a lot of time in confirming your test, we can see that :-) I will merge now but be prepared that probably we will need to adjust the test some times according to how the product will change and I assume not many are willing (or able) to understand what the test does so they will come back to you to fix it :-) |
I am fine with that. Thanks! :) |
@mnowaksuse this PR won't 100% works on Factory/Leap staging, for TW staging, it's depend on when do snapshot online repo is published and what version number we are using in the staging, eg. while testing https://openqa.opensuse.org/tests/235834 the 0728 snpashot repo was published, so the local repository is disabled after insallation; but see https://openqa.opensuse.org/tests/235680#step/zypper_lr/3, when testing it 0730 repo was not published, so the local repo still enabled. Therefore, you have to improve the logic here, or we will get the same problem depend on timing. Note that, after introduced the change for fate#320494, we have to enable all local repo for staging anyway - 7e9e81f , but zypper_clear_repos is executed after zypper_lr. |
After all it seems that openSUSE and staging is not that important.It brought problems which might not be fixed easily: os-autoinst#1495 (comment). After suggestion from Max Lin (os-autoinst#1636) this change removes openSUSE and staging testing; including control.xml validation code as it seems that SLE control.xml files do not include repository information at all.
After all it seems that openSUSE and staging is not that important.It brought problems which might not be fixed easily: os-autoinst#1495 (comment). After suggestion from Max Lin (os-autoinst#1636) this change removes openSUSE and staging testing; including control.xml validation code as it seems that SLE control.xml files do not include repository information at all.
PR#11708
Before
zypper_lr
test case just listed zypper repositories. Nowthe test case makes sure repositories which should be present are
actually there.
SLES/SLED base products are supported, so are addons (those defined by
ADDONS, ADDONURL, and SCC_ADDONS variables) with Pool nad Updates SCC
channels if defined by SCC_ADDONS.
Verification runs:
Server-DVD-HA + GEO with SCC channels:
http://assam.suse.cz/tests/1830#step/zypper_lr/55
PR#11460 (FATE#320494)
This test case also verifies following test cases from FATE#320494:
Test case #1: not registered system
enabled.
Test case #2: registered system + addon
Extensions and Modules" screen).
zypper lr and check that the source corresponding to the CD/DVD is
disabled (but it's still there).
Test case #3: registered system + not registered addon
Product" screen).
zypper lr and check that the source corresponding to the CD/DVD is
disabled (but it's still there) and the source corresponding to the SDK
add-on is enabled.