Skip to content

Commit

Permalink
fix: cleanup PR 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarbu15 committed Nov 9, 2024
1 parent 386a772 commit 31b0a0d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests-functional/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions tests-functional/clients/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def wait_for_signal(self, signal_type, timeout=20):
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):
Expand All @@ -46,7 +46,7 @@ def wait_for_complete_signal(self, signal_type, timeout=5):
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")
Expand Down
4 changes: 2 additions & 2 deletions tests-functional/src/libs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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

Expand Down

0 comments on commit 31b0a0d

Please sign in to comment.