Skip to content

Commit 1f06eaf

Browse files
committed
fix: get a sensible message string
1 parent 05ab96f commit 1f06eaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/nagios.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def test_cache(self):
7070
"""Test the caching mechanism in the reporter."""
7171
length = random.randint(1, 30)
7272

73-
message = ''.join(random.choice(string.printable) for x in range(length))
74-
message = message.rstrip()
73+
message = "huppeldepup a test string"
7574

7675
threshold = None
7776
filename = PurePath(next(tempfile._get_candidate_names()))
@@ -82,6 +81,7 @@ def test_cache(self):
8281
for exit_code in range(0, 4):
8382

8483
nagios_exit = [NAGIOS_EXIT_OK, NAGIOS_EXIT_WARNING, NAGIOS_EXIT_CRITICAL, NAGIOS_EXIT_UNKNOWN][exit_code]
84+
logging.info("Caching the exit: %s", nagios_exit)
8585
reporter.cache(nagios_exit, message)
8686

8787
old_stdout = sys.stdout

0 commit comments

Comments
 (0)