Skip to content

Commit

Permalink
🧹 fix cloud integration tests (#1151)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Jul 24, 2024
1 parent 5872e48 commit e28adf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/framework/nexus/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -45,7 +46,8 @@ func ListAssetsWithScores(
Grade string
}
Platform struct {
Name string
Name string
Runtime string
}
AssetType string `graphql:"asset_type"`
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/audit_config_base_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e28adf9

Please sign in to comment.