Skip to content

Commit

Permalink
Close predicate file during tests
Browse files Browse the repository at this point in the history
Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
  • Loading branch information
lcarva committed Jun 6, 2023
1 parent f9f205b commit 723c340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cosign/cli/attest/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func TestPredicateReader(t *testing.T) {
}

got, err := predicateReader(pf)
if err != nil {
defer got.Close()
}

if tc.wantErr {
require.Error(t, err)
return
Expand Down

0 comments on commit 723c340

Please sign in to comment.