Project

General

Profile

Actions

action #25504

closed

Support for changing test variables including needles during test run (was: utils::sle_version_at_least needs refinement)

Added by xlai over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Bugs in existing tests
Target version:
-
Start date:
2017-09-22
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

In sle15, many test files of installation uses function sle_version_at_least to do check for product version, so as to differenciate sle15 new behaviors from older products.

However, this may be not correct.

Since sle12sp2, a new var INSTALL_TO_OTHERS was introduced for tests that needed to install system to a different product(mostly former product), for example in sles12sp3 release, virtualization job group in openqa.suse.de already had tests that actually installed system to sle11sp4, sle12sp1, sle12sp2, like https://openqa.suse.de/tests/1058378.

So IMHO, sle15 different behavior should be done for ONLY those really install to a product at least 15, that is for those tests with INSTALL_TO_OTHERS, we should check the version that it want to install is at least 15, and for those without INSTALL_TO_OTHERS, just do what sle_version_at_least does. This is my first thing to talk. Do you agree?

Currently in utils, there are two apis, install_to_other_at_least and sle_version_at_least to check versions for both situations. So the sle15 different behavior should be done only for a condition like "((install_this_version() && sle_version_at_least('15')) || install_to_other_at_least('15'))", rather than simple sle_version_at_least('15').

However the above complex condition writing is absolutely not a good idea. So here comes the second topic. Solution to it. What comes up to me are:
option 1) add a new api to stand the above complex checking for versions, using the apis install_to_other_at_least and sle_version_at_least, and replace all the usages of the api to the new one, and also notify all test writers about it.
option 2) keep the api, but rewrite it to represent the complex checking. Good thing is no need to change various usages. All test writers does not needs to know about the change, and continue to regard the api as the assumed perfect one.

I personally prefer option 2. What's your choice? Or any other solutions you can figure out?


Related issues 1 (0 open1 closed)

Related to openQA Project - action #13156: os-autoinst: Add support to easily switch VERSION during a test runResolved2016-08-11

Actions
Actions

Also available in: Atom PDF