From 8467488c432cd656ab2985648563ae65b0419c6f Mon Sep 17 00:00:00 2001 From: Or Ouziel Date: Thu, 31 Oct 2024 13:41:32 +0200 Subject: [PATCH] azure: add integration tests cases (#2649) --- .../inventory/gcpfetcher/fetcher_assets.go | 1 + .../data/gcp_asset_inventory/test_cases.py | 60 +++++++++---------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/internal/inventory/gcpfetcher/fetcher_assets.go b/internal/inventory/gcpfetcher/fetcher_assets.go index 02404e3b90..59e01b76a6 100644 --- a/internal/inventory/gcpfetcher/fetcher_assets.go +++ b/internal/inventory/gcpfetcher/fetcher_assets.go @@ -54,6 +54,7 @@ var ResourcesToFetch = []ResourcesClassification{ {gcpinventory.ComputeForwardingRuleAssetType, inventory.AssetClassificationGcpForwardingRule}, {gcpinventory.CloudFunctionAssetType, inventory.AssetClassificationGcpCloudFunction}, {gcpinventory.CloudRunService, inventory.AssetClassificationGcpCloudRunService}, + {gcpinventory.IamRoleAssetType, inventory.AssetClassificationGcpIamRole}, } func newAssetsInventoryFetcher(logger *logp.Logger, provider inventoryProvider) inventory.AssetFetcher { diff --git a/tests/product/tests/data/gcp_asset_inventory/test_cases.py b/tests/product/tests/data/gcp_asset_inventory/test_cases.py index 66c4a3564f..4b9f83f039 100644 --- a/tests/product/tests/data/gcp_asset_inventory/test_cases.py +++ b/tests/product/tests/data/gcp_asset_inventory/test_cases.py @@ -29,12 +29,12 @@ type_="subnet", sub_type="gcp-subnet", ), - # "[Asset Inventory][GCP][Project] assets found": AssetInventoryCase( - # category="infrastructure", - # sub_category="management", - # type_="cloud-account", - # sub_type="gcp-project", - # ), + "[Asset Inventory][GCP][Project] assets found": AssetInventoryCase( + category="infrastructure", + sub_category="management", + type_="cloud-account", + sub_type="gcp-project", + ), # "[Asset Inventory][GCP][Organization] assets found": AssetInventoryCase( # category="infrastructure", # sub_category="management", @@ -47,18 +47,18 @@ # type_="resource-hierarchy", # sub_type="gcp-folder", # ), - # "[Asset Inventory][GCP][Bucket] assets found": AssetInventoryCase( - # category="infrastructure", - # sub_category="storage", - # type_="object-storage", - # sub_type="gcp-bucket", - # ), - # "[Asset Inventory][GCP][Firewall] assets found": AssetInventoryCase( - # category="infrastructure", - # sub_category="network", - # type_="firewall", - # sub_type="gcp-firewall", - # ), + "[Asset Inventory][GCP][Bucket] assets found": AssetInventoryCase( + category="infrastructure", + sub_category="storage", + type_="object-storage", + sub_type="gcp-bucket", + ), + "[Asset Inventory][GCP][Firewall] assets found": AssetInventoryCase( + category="infrastructure", + sub_category="network", + type_="firewall", + sub_type="gcp-firewall", + ), # "[Asset Inventory][GCP][GKE Cluster] assets found": AssetInventoryCase( # category="infrastructure", # sub_category="container", @@ -71,22 +71,22 @@ # type_="load-balancing", # sub_type="gcp-forwarding-rule", # ), - # "[Asset Inventory][GCP][IAM Role] assets found": AssetInventoryCase( - # category="identity", - # sub_category="access-management", - # type_="iam-role", - # sub_type="gcp-iam-role", - # ), + "[Asset Inventory][GCP][IAM Role] assets found": AssetInventoryCase( + category="identity", + sub_category="access-management", + type_="iam-role", + sub_type="gcp-iam-role", + ), # "[Asset Inventory][GCP][Cloud Function] assets found": AssetInventoryCase( # category="infrastructure", # sub_category="serverless", # type_="function", # sub_type="gcp-cloud-function", # ), - # "[Asset Inventory][GCP][Cloud Run Service] assets found": AssetInventoryCase( - # category="infrastructure", - # sub_category="container", - # type_="serverless", - # sub_type="gcp-cloud-run-service", - # ), + "[Asset Inventory][GCP][Cloud Run Service] assets found": AssetInventoryCase( + category="infrastructure", + sub_category="container", + type_="serverless", + sub_type="gcp-cloud-run-service", + ), }