mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-30 23:34:27 +00:00
feat(attack-paths): scans add tenant and provider related labels to nodes (#10308)
This commit is contained in:
1 parent
1cf6eaa0b7
commit
787a339cd9
9 files changed
+66
-7
No files matched your search
@@ -151,6 +151,7 @@ class TestAttackPathsRun:
|
||||
mock_sync.assert_called_once_with(
|
||||
source_database="db-scan-id",
|
||||
target_database="tenant-db",
|
||||
tenant_id=str(provider.tenant_id),
|
||||
provider_id=str(provider.id),
|
||||
)
|
||||
mock_get_ingestion.assert_called_once_with(provider.provider)
|
||||
@@ -1118,12 +1119,15 @@ class TestSyncNodes:
|
||||
"tasks.jobs.attack_paths.sync.graph_database.get_session",
|
||||
side_effect=[source_ctx, target_ctx],
|
||||
):
|
||||
total = sync_module.sync_nodes("source-db", "target-db", "prov-1")
|
||||
total = sync_module.sync_nodes(
|
||||
"source-db", "target-db", "tenant-1", "prov-1"
|
||||
)
|
||||
|
||||
assert total == 1
|
||||
query = mock_target_session.run.call_args.args[0]
|
||||
assert "_ProviderResource" in query
|
||||
assert "ProviderResource" not in query.replace("_ProviderResource", "")
|
||||
assert "_Tenant_tenant1" in query
|
||||
assert "_Provider_prov1" in query
|
||||
|
||||
|
||||
class TestInternetAnalysis:
|
||||
|
||||
Reference in new issue
Block a user