Skip to content

Commit d5952b3

Browse files
committed
test_extra_group_pkgs: fix pkgfixture usage
pkgfixture stuff must *always* be used from conftest.py, or else strange problems appear because of the result shown in pytest-dev/pytest#8189 (comment) Signed-off-by: Yann Dirson <[email protected]>
1 parent 111f095 commit d5952b3

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/packages/extra/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
import pytest
33
import urllib.request
44

5+
# Explicitly import package-scoped fixtures (see explanation in pkgfixtures.py)
6+
from pkgfixtures import host_with_saved_yum_state
7+
# Requirements:
8+
# From --hosts parameter:
9+
# - host(A1): any master host of a pool, with access to XCP-ng RPM repositories and reports.xcp-ng.org.
10+
511
@pytest.fixture(scope="session")
612
def extra_pkgs(host):
713
version = host.xcp_version_short

tests/packages/extra/test_extra_group_pkgs.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# Explicitly import package-scoped fixtures (see explanation in pkgfixtures.py)
2-
from pkgfixtures import host_with_saved_yum_state
3-
4-
# Requirements:
5-
# From --hosts parameter:
6-
# - host(A1): any master host of a pool, with access to XCP-ng RPM repositories and reports.xcp-ng.org.
7-
81
def test_extra_group_packages_url_resolved(host, extra_pkgs):
92
for p in extra_pkgs:
103
host.ssh(['yumdownloader', '--resolve', '--urls', p])

0 commit comments

Comments
 (0)