From 634b472a884a9a160435dcb67f42eb655ae46ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20De=20la=20Torre=20Vico?= Date: Tue, 23 Jul 2024 11:44:24 +0200 Subject: [PATCH] chore(documentdb): Change checks IDs to match with metadata --- ...mentdb_cluster_backup_enabled.metadata.json | 2 +- .../__init__.py | 0 ..._deletion_protection_enabled.metadata.json} | 0 ...tdb_cluster_deletion_protection_enabled.py} | 2 +- ...umentdb_cluster_deletion_protection_test.py | 18 +++++++++--------- 5 files changed, 11 insertions(+), 11 deletions(-) rename prowler/providers/aws/services/documentdb/{documentdb_cluster_deletion_protection => documentdb_cluster_deletion_protection_enabled}/__init__.py (100%) rename prowler/providers/aws/services/documentdb/{documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.metadata.json => documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.metadata.json} (100%) rename prowler/providers/aws/services/documentdb/{documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.py => documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.py} (93%) diff --git a/prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json b/prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json index 64e59ce799..2449074301 100644 --- a/prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json +++ b/prowler/providers/aws/services/documentdb/documentdb_cluster_backup_enabled/documentdb_cluster_backup_enabled.metadata.json @@ -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", diff --git a/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/__init__.py b/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/__init__.py similarity index 100% rename from prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/__init__.py rename to prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/__init__.py diff --git a/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.metadata.json b/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.metadata.json similarity index 100% rename from prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.metadata.json rename to prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.metadata.json diff --git a/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.py b/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.py similarity index 93% rename from prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.py rename to prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.py index 67f40512d3..27c9968857 100644 --- a/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection.py +++ b/prowler/providers/aws/services/documentdb/documentdb_cluster_deletion_protection_enabled/documentdb_cluster_deletion_protection_enabled.py @@ -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(): diff --git a/tests/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection_test.py b/tests/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection_test.py index 4f02bc8114..66c0abb387 100644 --- a/tests/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection_test.py +++ b/tests/providers/aws/services/documentdb/documentdb_cluster_deletion_protection/documentdb_cluster_deletion_protection_test.py @@ -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 (