7
7
]
8
8
9
9
10
- @pytest .fixture
10
+ @pytest .fixture ( scope = "function" )
11
11
def salt_systemd_setup (
12
12
salt_call_cli ,
13
13
install_salt ,
@@ -39,10 +39,6 @@ def test_salt_systemd_disabled_preservation(
39
39
if not install_salt .upgrade :
40
40
pytest .skip ("Not testing an upgrade, do not run" )
41
41
42
- # setup systemd to enabled and active for Salt packages
43
- # pylint: disable=pointless-statement
44
- salt_systemd_setup
45
-
46
42
# ensure known state, disabled
47
43
test_list = ["salt-api" , "salt-minion" , "salt-master" ]
48
44
for test_item in test_list :
@@ -74,10 +70,6 @@ def test_salt_systemd_enabled_preservation(
74
70
if not install_salt .upgrade :
75
71
pytest .skip ("Not testing an upgrade, do not run" )
76
72
77
- # setup systemd to enabled and active for Salt packages
78
- # pylint: disable=pointless-statement
79
- salt_systemd_setup
80
-
81
73
# Upgrade Salt (inc. minion, master, etc.) from previous version and test
82
74
# pylint: disable=pointless-statement
83
75
install_salt .install (upgrade = True )
@@ -102,10 +94,6 @@ def test_salt_systemd_inactive_preservation(
102
94
if not install_salt .upgrade :
103
95
pytest .skip ("Not testing an upgrade, do not run" )
104
96
105
- # setup systemd to enabled and active for Salt packages
106
- # pylint: disable=pointless-statement
107
- salt_systemd_setup
108
-
109
97
# ensure known state, disabled
110
98
test_list = ["salt-api" , "salt-minion" , "salt-master" ]
111
99
for test_item in test_list :
@@ -137,10 +125,6 @@ def test_salt_systemd_active_preservation(
137
125
if not install_salt .upgrade :
138
126
pytest .skip ("Not testing an upgrade, do not run" )
139
127
140
- # setup systemd to enabled and active for Salt packages
141
- # pylint: disable=pointless-statement
142
- salt_systemd_setup
143
-
144
128
# Upgrade Salt (inc. minion, master, etc.) from previous version and test
145
129
# pylint: disable=pointless-statement
146
130
install_salt .install (upgrade = True )
@@ -163,10 +147,6 @@ def test_salt_ownership_permission(salt_call_cli, install_salt, salt_systemd_set
163
147
if not install_salt .upgrade :
164
148
pytest .skip ("Not testing an upgrade, do not run" )
165
149
166
- # setup systemd to enabled and active for Salt packages
167
- # pylint: disable=pointless-statement
168
- salt_systemd_setup
169
-
170
150
# test ownership for Minion, Master and Api
171
151
test_list = ["salt-api" , "salt-minion" , "salt-master" ]
172
152
for test_item in test_list :
0 commit comments