Skip to content

Commit

Permalink
fixup! add test
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Dec 4, 2024
1 parent 6248198 commit acd4990
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/policy/deterministic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestDeterminsticPolicyGeneration(t *testing.T) {
// generate policy 5 times and check if the policy hash is the same
var policies map[manifest.HexString]manifest.PolicyEntry
for i := 0; i < 5; i++ {
t.Log("Generate run", i)
require.NoError(os.WriteFile(path.Join(ct.WorkDir, "resources.yml"), buf, 0o644)) // reset file for each run
require.True(t.Run("generate", ct.Generate), "contrast generate needs to succeed for subsequent tests")
manifestBytes, err := os.ReadFile(ct.WorkDir + "/manifest.json")
Expand All @@ -52,4 +53,5 @@ func TestDeterminsticPolicyGeneration(t *testing.T) {
policies = m.Policies // only set policies on the first run
}
}
t.Log("Policies are deterministic")
}

0 comments on commit acd4990

Please sign in to comment.