fix(cloudtrail): improve cloudtrail_cloudwatch_logging_enabled status extended (#1813)

Co-authored-by: sergargar <sergio@verica.io>
This commit is contained in:
Sergio Garcia
2023-02-01 14:08:11 +01:00
committed by GitHub
parent 89aab4acd5
commit 360c6f3c1c
2 changed files with 8 additions and 8 deletions

View File

@@ -220,15 +220,15 @@ class Test_cloudtrail_cloudwatch_logging_enabled:
assert report.resource_id == trail_name_us
assert report.resource_arn == trail_us["TrailARN"]
assert report.status == "PASS"
assert search(
report.status_extended,
f"Single region trail {trail_name_us} has been logging the last 24h",
assert (
report.status_extended
== f"Single region trail {trail_name_us} has been logging the last 24h"
)
if report.resource_id == trail_name_eu:
assert report.resource_id == trail_name_eu
assert report.resource_arn == trail_eu["TrailARN"]
assert report.status == "FAIL"
assert search(
report.status_extended,
f"Single region trail {trail_name_eu} is not configured to deliver logs",
assert (
report.status_extended
== f"Single region trail {trail_name_eu} is not logging in the last 24h or not configured to deliver logs"
)