Skip to content

Commit

Permalink
make sure ci/cd test passes in github
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev committed Feb 5, 2024
1 parent f0817c5 commit d96eff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions explorer/scan/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ func TestDiscoverAssets(t *testing.T) {
t.Run("set ci/cd labels", func(t *testing.T) {
inv := getInventory()
inv.Spec.Assets[0].Category = inventory.AssetCategory_CATEGORY_CICD
require.NoError(t, os.Setenv("KUBERNETES_ADMISSION_CONTROLLER", "true"))
require.NoError(t, os.Setenv("GITHUB_ACTION", "go-test"))
discoveredAssets, err := DiscoverAssets(context.Background(), inv, nil, providers.NullRecording{})
require.NoError(t, err)

for _, asset := range discoveredAssets.Assets {
require.Contains(t, asset.Asset.Labels, "mondoo.com/exec-environment")
assert.Equal(t, "k8s.mondoo.com", asset.Asset.Labels["mondoo.com/exec-environment"])
assert.Equal(t, "actions.github.com", asset.Asset.Labels["mondoo.com/exec-environment"])
}
})
}

0 comments on commit d96eff1

Please sign in to comment.