@@ -49,9 +49,20 @@ def storage_pool_name(provisioning_type):
49
49
def provisioning_type (request ):
50
50
return request .param
51
51
52
+ def pytest_configure (config ):
53
+ config ._linstor_upgrade_test = False
54
+
55
+ def pytest_collection_modifyitems (config , items ):
56
+ for item in items :
57
+ if item .get_closest_marker ("upgrade_test" ):
58
+ config ._linstor_upgrade_test = True
59
+ break
60
+
52
61
@pytest .fixture (scope = 'package' )
53
- def pool_with_linstor (hostA2 , lvm_disks , pool_with_saved_yum_state ):
62
+ def pool_with_linstor (hostA2 , lvm_disks , pool_with_saved_yum_state , request ):
54
63
import concurrent .futures
64
+
65
+ dont_use_testing_repo = request .config ._linstor_upgrade_test
55
66
pool = pool_with_saved_yum_state
56
67
57
68
def check_linstor_installed (host ):
@@ -66,7 +77,10 @@ def check_linstor_installed(host):
66
77
def install_linstor (host ):
67
78
logging .info (f"Installing { LINSTOR_PACKAGE } on host { host } ..." )
68
79
host .yum_install ([LINSTOR_RELEASE_PACKAGE ])
69
- host .yum_install ([LINSTOR_PACKAGE ], enablerepo = "xcp-ng-linstor-testing" )
80
+ if dont_use_testing_repo :
81
+ host .yum_install ([LINSTOR_PACKAGE ])
82
+ else :
83
+ host .yum_install ([LINSTOR_PACKAGE ], enablerepo = "xcp-ng-linstor-testing" )
70
84
# Needed because the linstor driver is not in the xapi sm-plugins list
71
85
# before installing the LINSTOR packages.
72
86
host .ssh (["systemctl" , "restart" , "multipathd" ])
0 commit comments