chore(documentdb): Change checks IDs to match with metadata

This commit is contained in:
Rubén De la Torre Vico
2024-07-23 11:44:24 +02:00
parent 684f63d398
commit 634b472a88
5 changed files with 11 additions and 11 deletions
@@ -1,6 +1,6 @@
{
"Provider": "aws",
"CheckID": "documentdb_cluster_backup_retention",
"CheckID": "documentdb_cluster_backup_enabled",
"CheckTitle": "Check if DocumentDB Clusters have backup enabled.",
"CheckType": [],
"ServiceName": "DocumentDB",
@@ -4,7 +4,7 @@ from prowler.providers.aws.services.documentdb.documentdb_client import (
)
class documentdb_cluster_deletion_protection(Check):
class documentdb_cluster_deletion_protection_enabled(Check):
def execute(self):
findings = []
for cluster in documentdb_client.db_clusters.values():
@@ -21,11 +21,11 @@ class Test_documentdb_cluster_deletion_protection:
"prowler.providers.aws.services.documentdb.documentdb_service.DocumentDB",
new=documentdb_client,
):
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection.documentdb_cluster_deletion_protection import (
documentdb_cluster_deletion_protection,
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection_enabled.documentdb_cluster_deletion_protection_enabled import (
documentdb_cluster_deletion_protection_enabled,
)
check = documentdb_cluster_deletion_protection()
check = documentdb_cluster_deletion_protection_enabled()
result = check.execute()
assert len(result) == 0
@@ -52,11 +52,11 @@ class Test_documentdb_cluster_deletion_protection:
"prowler.providers.aws.services.documentdb.documentdb_service.DocumentDB",
new=documentdb_client,
):
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection.documentdb_cluster_deletion_protection import (
documentdb_cluster_deletion_protection,
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection_enabled.documentdb_cluster_deletion_protection_enabled import (
documentdb_cluster_deletion_protection_enabled,
)
check = documentdb_cluster_deletion_protection()
check = documentdb_cluster_deletion_protection_enabled()
result = check.execute()
assert len(result) == 1
@@ -91,11 +91,11 @@ class Test_documentdb_cluster_deletion_protection:
"prowler.providers.aws.services.documentdb.documentdb_service.DocumentDB",
new=documentdb_client,
):
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection.documentdb_cluster_deletion_protection import (
documentdb_cluster_deletion_protection,
from prowler.providers.aws.services.documentdb.documentdb_cluster_deletion_protection_enabled.documentdb_cluster_deletion_protection_enabled import (
documentdb_cluster_deletion_protection_enabled,
)
check = documentdb_cluster_deletion_protection()
check = documentdb_cluster_deletion_protection_enabled()
result = check.execute()
assert result[0].status == "PASS"
assert (