From 31b0a0d600fad026865cee4a24b3f3c4cb52688d Mon Sep 17 00:00:00 2001 From: Florin Barbu Date: Sat, 9 Nov 2024 09:53:01 +0200 Subject: [PATCH] fix: cleanup PR 1 --- .gitignore | 2 ++ tests-functional/.gitignore | 2 -- tests-functional/clients/signals.py | 4 ++-- tests-functional/src/libs/common.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 tests-functional/.gitignore diff --git a/.gitignore b/.gitignore index 9cf5c3383..71b376b92 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,8 @@ __pycache__/ report/results.xml tests-functional/coverage tests-functional/reports +tests-functional/local +tests-functional/status-backend tests-functional/*.log # generated files diff --git a/tests-functional/.gitignore b/tests-functional/.gitignore deleted file mode 100644 index 6a45c55fe..000000000 --- a/tests-functional/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea/ -.local/ diff --git a/tests-functional/clients/signals.py b/tests-functional/clients/signals.py index af6bf2c55..0bf453931 100644 --- a/tests-functional/clients/signals.py +++ b/tests-functional/clients/signals.py @@ -32,7 +32,7 @@ class SignalClient: raise TimeoutError( f"Signal {signal_type} is not received in {timeout} seconds") time.sleep(0.2) - logger.debug(f"Signal {signal_type} is received in {round(time.time() - start_time)} seconds") + logger.info(f"Signal {signal_type} is received in {round(time.time() - start_time)} seconds") return self.received_signals[signal_type][0] def wait_for_complete_signal(self, signal_type, timeout=5): @@ -46,7 +46,7 @@ class SignalClient: time.sleep(0.2) if events: - logger.debug( + logger.info( f"Collected {len(events)} events of type {signal_type} within {timeout} seconds") return events raise TimeoutError(f"No signals of type {signal_type} received in {timeout} seconds") diff --git a/tests-functional/src/libs/common.py b/tests-functional/src/libs/common.py index 2f2d8116f..4ca436e74 100644 --- a/tests-functional/src/libs/common.py +++ b/tests-functional/src/libs/common.py @@ -10,7 +10,7 @@ from pathlib import Path logger = get_custom_logger(__name__) GO_PROJECT_ROOT = Path(__file__).resolve().parents[3] -SOURCE_DIR = GO_PROJECT_ROOT / "cmd/status-backend" +SOURCE_DIR = GO_PROJECT_ROOT / "build/bin" DEST_DIR = GO_PROJECT_ROOT / "tests-functional" BINARY_PATH = SOURCE_DIR / "status-backend" REPORTS_DIR = DEST_DIR / "reports" @@ -36,7 +36,7 @@ def get_project_root() -> str: def write_signal_to_file(signal_data): - with open(LOG_FILE_PATH, "a") as file: + with open(LOG_FILE_PATH, "a+") as file: json.dump(signal_data, file) file.write("\n")