fix: cleanup PR 1

This commit is contained in:
Florin Barbu 2024-11-09 09:53:01 +02:00
parent 386a772e0d
commit 31b0a0d600
No known key found for this signature in database
GPG Key ID: 593D6DBC6D9E5095
4 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -1,2 +0,0 @@
.idea/
.local/

View File

@ -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")

View File

@ -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")