Skip to content

Commit 1f24b83

Browse files
dmurphy18twangboy
authored andcommitted
Remove debug statements, and additions made from 67914 WIP Fix nightly build package test failures
1 parent 8266a2f commit 1f24b83

File tree

4 files changed

+6
-31
lines changed

4 files changed

+6
-31
lines changed

noxfile.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ def ci_test_onedir_pkgs(session):
19111911
except CommandFailed:
19121912
if os.environ.get("RERUN_FAILURES", "0") == "0":
19131913
# Don't rerun on failures
1914-
sys.exit(1)
1914+
return
19151915

19161916
# Don't print the system information, not the test selection on reruns
19171917
global PRINT_TEST_SELECTION
@@ -1947,7 +1947,7 @@ def ci_test_onedir_pkgs(session):
19471947
common_pytest_args[:]
19481948
+ cmd_args[:]
19491949
+ [
1950-
"--no-uninstall",
1950+
"--no-install",
19511951
"--junitxml=artifacts/xml-unittests-output/test-results-install.xml",
19521952
"--log-file=artifacts/logs/runtests-install.log",
19531953
]
@@ -1962,7 +1962,7 @@ def ci_test_onedir_pkgs(session):
19621962
except CommandFailed:
19631963
if os.environ.get("RERUN_FAILURES", "0") == "0":
19641964
# Don't rerun on failures
1965-
sys.exit(1)
1965+
return
19661966
cmd_args = chunks["install"]
19671967
pytest_args = (
19681968
common_pytest_args[:]

salt/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def string(self):
456456
version_string += f".{self.mbugfix}"
457457
if self.pre_type:
458458
version_string += f"{self.pre_type}{self.pre_num}"
459-
if self.noc is not None and self.sha:
459+
if self.noc and self.sha:
460460
noc = self.noc
461461
if noc < 0:
462462
noc = "0na"

tests/pytests/pkg/integration/test_version.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ def test_compare_versions(binary, install_salt):
104104
"""
105105
Test compare versions
106106
"""
107-
if install_salt.use_prev_version:
108-
version = install_salt.prev_version
109-
else:
110-
version = install_salt.artifact_version
107+
version = install_salt.artifact_version
111108
if binary in install_salt.binary_paths:
112109
if install_salt.upgrade:
113110
install_salt.install()

tests/pytests/pkg/upgrade/test_salt_upgrade.py

+1-23
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def salt_test_upgrade(
105105
new_minion_pids = _get_running_named_salt_pid(process_minion_name)
106106
new_master_pids = _get_running_named_salt_pid(process_master_name)
107107

108-
if sys.platform == "linux" and install_salt.distro_id not in ("ubuntu", "debian"):
108+
if sys.platform == "linux":
109109
assert new_minion_pids
110110
assert new_master_pids
111111
assert new_minion_pids != old_minion_pids
@@ -149,34 +149,20 @@ def test_salt_sysv_service_files(install_salt):
149149
if not (salt.utils.path.which("dpkg") or salt.utils.path.which("rpm")):
150150
pytest.skip("Not testing on a Debian or RedHat family platform, do not run")
151151

152-
print(
153-
f"DGM test_salt_sysv_service_files entry install_salt, '{install_salt}'",
154-
flush=True,
155-
)
156-
157152
test_pkgs = install_salt.pkgs
158-
print(f"DGM test_salt_sysv_service_files test_pkgs, '{test_pkgs}'", flush=True)
159153
for test_pkg_name in test_pkgs:
160154
test_pkg_basename = os.path.basename(test_pkg_name)
161155
# Debian/Ubuntu name typically salt-minion_300xxxxxx
162156
# Redhat name typically salt-minion-300xxxxxx
163157
test_pkg_basename_dash_underscore = test_pkg_basename.split("300")[0]
164158
test_pkg_basename_adj = test_pkg_basename_dash_underscore[:-1]
165-
print(
166-
f"DGM test_salt_sysv_service_files test_pkg_basename_dash_underscore '{test_pkg_basename_dash_underscore}', test_pkg_basename_adj '{test_pkg_basename_adj}' from name test_pkg_basename '{test_pkg_basename}'",
167-
flush=True,
168-
)
169159
if test_pkg_basename_adj in (
170160
"salt-minion",
171161
"salt-master",
172162
"salt-syndic",
173163
"salt-api",
174164
):
175165
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-
)
180166
if salt.utils.path.which("dpkg"):
181167
proc = subprocess.run(
182168
["dpkg", "-c", f"{test_pkg_name}"],
@@ -192,16 +178,8 @@ def test_salt_sysv_service_files(install_salt):
192178
found_line = False
193179
for line in proc.stdout.decode().splitlines():
194180
# 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-
)
199181
if test_initd_name in line:
200182
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-
)
205183
break
206184

207185
assert found_line

0 commit comments

Comments
 (0)