From e28adf95a9f3dbc2e6bedb0cf34d2fb5d52dcbb6 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 24 Jul 2024 14:23:52 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20fix=20cloud=20integration=20test?= =?UTF-8?q?s=20(#1151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- tests/framework/nexus/assets/assets.go | 6 ++++-- tests/integration/audit_config_base_suite.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/framework/nexus/assets/assets.go b/tests/framework/nexus/assets/assets.go index 5dab7b35..1b7f2c55 100644 --- a/tests/framework/nexus/assets/assets.go +++ b/tests/framework/nexus/assets/assets.go @@ -15,7 +15,8 @@ type AssetWithScore struct { Labels map[string]string Grade string Platform struct { - Name string + Name string + Runtime string } PolicyScores []PolicyScore AssetType string @@ -45,7 +46,8 @@ func ListAssetsWithScores( Grade string } Platform struct { - Name string + Name string + Runtime string } AssetType string `graphql:"asset_type"` } diff --git a/tests/integration/audit_config_base_suite.go b/tests/integration/audit_config_base_suite.go index 7911ba91..8348dd0e 100644 --- a/tests/integration/audit_config_base_suite.go +++ b/tests/integration/audit_config_base_suite.go @@ -1256,7 +1256,7 @@ func (s *AuditConfigBaseSuite) AssetsNotUnscored(assets []assets.AssetWithScore) expectedPolicies := defaultK8sNodePolicyMrns if strings.Contains(asset.Platform.Name, "k8s") { expectedPolicies = defaultK8sPolicyMrns - } else if strings.Contains(asset.Name, "nginx") || strings.Contains(asset.Name, "redis") || strings.Contains(asset.Name, "k3d") { + } else if strings.Contains(asset.Name, "nginx") || strings.Contains(asset.Name, "redis") || strings.Contains(asset.Name, "k3d") || asset.Platform.Runtime == "docker-image" { expectedPolicies = defaultOsPolicyMrns } s.ElementsMatchf(expectedPolicies, scoredPolicies, "Scored policies for asset %s should be the default k8s policies", asset.Name)