@@ -149,34 +149,20 @@ def test_salt_sysv_service_files(salt_call_cli, install_salt):
149
149
if not (salt .utils .path .which ("dpkg" ) or salt .utils .path .which ("rpm" )):
150
150
pytest .skip ("Not testing on a Debian or RedHat family platform, do not run" )
151
151
152
- print (
153
- f"DGM test_salt_sysv_service_files entry install_salt, '{ install_salt } '" ,
154
- flush = True ,
155
- )
156
-
157
152
test_pkgs = install_salt .pkgs
158
- print (f"DGM test_salt_sysv_service_files test_pkgs, '{ test_pkgs } '" , flush = True )
159
153
for test_pkg_name in test_pkgs :
160
154
test_pkg_basename = os .path .basename (test_pkg_name )
161
155
# Debian/Ubuntu name typically salt-minion_300xxxxxx
162
156
# Redhat name typically salt-minion-300xxxxxx
163
- test_pkg_basename_dashunderscore = test_pkg_basename .split ("300" )[0 ]
164
- test_pkg_basename_adj = test_pkg_basename_dashunderscore [:- 1 ]
165
- print (
166
- f"DGM test_salt_sysv_service_files test_pkg_basename_dashunderscore '{ test_pkg_basename_dashunderscore } ', test_pkg_basename_adj '{ test_pkg_basename_adj } ' from name test_pkg_basename '{ test_pkg_basename } '" ,
167
- flush = True ,
168
- )
157
+ test_pkg_basename_dash_underscore = test_pkg_basename .split ("300" )[0 ]
158
+ test_pkg_basename_adj = test_pkg_basename_dash_underscore [:- 1 ]
169
159
if test_pkg_basename_adj in (
170
160
"salt-minion" ,
171
161
"salt-master" ,
172
162
"salt-syndic" ,
173
163
"salt-api" ,
174
164
):
175
165
test_initd_name = f"/etc/init.d/{ test_pkg_basename_adj } "
176
- print (
177
- f"DGM test_salt_sysv_service_files test_initd_name, '{ test_initd_name } ' to check against" ,
178
- flush = True ,
179
- )
180
166
if salt .utils .path .which ("dpkg" ):
181
167
proc = subprocess .run (
182
168
["dpkg" , "-q" , "-c" , f"{ test_pkg_name } " ],
@@ -192,16 +178,9 @@ def test_salt_sysv_service_files(salt_call_cli, install_salt):
192
178
found_line = False
193
179
for line in proc .stdout .decode ().splitlines ():
194
180
# If test_initd_name not present we should fail.
195
- print (
196
- f"DGM test_salt_sysv_service_files check line, '{ line } '" ,
197
- flush = True ,
198
- )
199
181
if line == test_initd_name :
200
182
found_line = True
201
- print (
202
- f"DGM test_salt_sysv_service_files test_initd_name, '{ test_initd_name } ' was FOUND" ,
203
- flush = True ,
204
- )
183
+ break
205
184
206
185
assert found_line
207
186
0 commit comments