Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ratushnyy committed Jan 9, 2024
1 parent 65428be commit e2410df
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ def juju_reports_one_primary(unit_messages):
async def test_audit_log(ops_test: OpsTest) -> None:
"""Test that audit log was created and contains actual audit data."""
leader_unit = await find_unit(ops_test, leader=True)
TMP_SERVICE_PATH = "tests/integration//audit.json.tmp"
AUDIT_LOG_SNAP_PATH = "/var/snap/charmed-mongodb/common/var/lib/mongodb/audit.json"
await leader_unit.scp_from(source=AUDIT_LOG_SNAP_PATH, destination=TMP_SERVICE_PATH)
with open(TMP_SERVICE_PATH, "r") as mongodb_service_file:
tmp_service_path = "tests/integration//audit.json.tmp"
audit_log_snap_path = "/var/snap/charmed-mongodb/common/var/lib/mongodb/audit.json"
await leader_unit.scp_from(source=audit_log_snap_path, destination=tmp_service_path)
with open(tmp_service_path, "r") as mongodb_service_file:
audit_log = mongodb_service_file.readlines()
# validate is not empty
assert len(audit_log) > 0
os.remove(TMP_SERVICE_PATH)
os.remove(tmp_service_path)

0 comments on commit e2410df

Please sign in to comment.