From 10336f06214938265f2d7cc066be638ccdea17b3 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Mon, 13 May 2024 16:44:17 -0400 Subject: [PATCH] Fix the missing python tests --- filebeat/tests/system/test_reload_inputs.py | 5 +++-- filebeat/tests/system/test_reload_modules.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/filebeat/tests/system/test_reload_inputs.py b/filebeat/tests/system/test_reload_inputs.py index bd1e19408942..53644837c2cf 100644 --- a/filebeat/tests/system/test_reload_inputs.py +++ b/filebeat/tests/system/test_reload_inputs.py @@ -152,8 +152,9 @@ def test_start_stop_replace(self): self.wait_until(lambda: self.output_lines() == 1) # Remove input - with open(self.working_dir + "/configs/input.yml", 'w') as f: - f.write("") + # Remove input by moving the file + # we keep it around to help debugging + os.rename(self.working_dir + "/configs/input.yml", self.working_dir + "/configs/input.yml.disabled") # Wait until input is stopped self.wait_until( diff --git a/filebeat/tests/system/test_reload_modules.py b/filebeat/tests/system/test_reload_modules.py index 5b8e08f49f40..8e38775b1eff 100644 --- a/filebeat/tests/system/test_reload_modules.py +++ b/filebeat/tests/system/test_reload_modules.py @@ -144,9 +144,9 @@ def test_start_stop(self): self.wait_until(lambda: self.output_lines() == 1, max_timeout=10) print(self.output_lines()) - # Remove input - with open(self.working_dir + "/configs/system.yml", 'w') as f: - f.write("") + # Remove input by moving the file + # we keep it around to help debugging + os.rename(self.working_dir + "/configs/input.yml", self.working_dir + "/configs/input.yml.disabled") # Wait until input is stopped self.wait_until(