On 11/19/20 1:28 PM, Nir Soffer wrote:
On Wed, Nov 18, 2020 at 6:40 PM Nir Soffer <nsoffer(a)redhat.com>
wrote:
> I'm trying to add a test module for image transfer:
>
https://gerrit.ovirt.org/c/112274/
>
> The test use concurrent.futures module form the standard library.
> This module is not available in python 2.7 but we don't support 2.7 in master
> and it was EOL since Jan 2020.
>
> The test fail when starting the suite:
>
> [2020-11-18T16:17:10.526Z] ============================= test session
> starts ==============================
> [2020-11-18T16:17:10.526Z] platform linux2 -- Python 2.7.5,
> pytest-4.6.9, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python2
> ...
> [2020-11-18T16:17:11.105Z] ==================================== ERRORS
> ====================================
>
> [2020-11-18T16:17:11.105Z] ___ ERROR collecting
> basic-suite-master/test-scenarios/008_image_transfer.py ___
> [2020-11-18T16:17:11.105Z] ImportError while importing test module
>
'/home/jenkins/agent/workspace/ovirt-system-tests_standard-check-patch/ovirt-system-tests/basic-suite-master/test-scenarios/008_image_transfer.py'
> [2020-11-18T16:17:11.105Z] Hint: make sure your test modules/packages
> have valid Python names.
> [2020-11-18T16:17:11.105Z] Traceback:
> [2020-11-18T16:17:11.105Z]
> ../basic-suite-master/test-scenarios/008_image_transfer.py:22: in
> <module>
> [2020-11-18T16:17:11.105Z] import concurrent.futures
> [2020-11-18T16:17:11.105Z] E ImportError: No module named concurrent.futures
>
> Should we use pytest.skip() to skip this test when running on python 2?
> Or just remove the python 2 build, I don't have any idea why we run master code
> python 2.
You're asking the wrong question here.
The right one is why we still don't have broad availability of el8
agents in CI?
+Anton +Michal
I added skip for python 2, but even with python 3 job, we need the
ovirt-imageio-client
package, available only on python 3.
Add the required package here
https://github.com/oVirt/ovirt-system-tests/blob/master/automation/basic_...
It will be installed only for el8.
We need to change ci to use different builds for python 2 and 3, or
drop the python 2
builds from the master suite.
In the current state we cannot test image transfer in the CI, only
locally. Using local
OST is easy and reliable. even with nested setup.
I think we can solve this with markers - instead of collecting all the tests,
we can use:
@pytest.mark.ci
def test_that_works_in_ci():
...
def test_that_does_not_work_in_ci():
...
The ci job can run:
pytest -m "ci"
So it picks only tests that can run in the ci environment.
What do you think?