action #69586
Updated by riafarov over 4 years ago
## Motivation `parse_repo_data` function was introduced in `lib/repo_tools.pm`, which allows to parse the information about repository and provides access to it. Though there is the `validate_repo_enablement` function which performs the validation, but it's a little bit limited (e.g. all the values are hard-coded, no way to verify only specific values). So it was decided to remove the `validate_repo_enablement` and replace it with `parse_repo_data`. The `validate_repo_enablement` is used only in 'validate_addon_repos' and 'validate_mirror_repos' test modules, currently (please, double-check this). Not to mix openQA variables and test data we can do following: 1. Allow expansion of the variables in the test data, like %VERSION% (see https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/scheduler.pm#L85 ) We should also add unit tests for testing this functionality 2. Define everything as openQA variables ## Acceptance criteria 1. `validate_repo_enablement` is replaced with `parse_repo_data` function in all test modules where it is used. 2. (Optional) Decide with the team on how to provide the data to the `parse_repo_data`, because the test modules already use some data from openQA variables, and, probably, mixing it with `test_data` from yaml file is not the ideal solution. Maybe it is better to use only `test_data`, but it requires investigation and discussions, as repo urls are not accessible from yaml schedule, but they are required for the tests.