From a53ec25587fb342dcd94b8581fd10a92cd4493d6 Mon Sep 17 00:00:00 2001 From: Zach Steindler Date: Wed, 11 Sep 2024 10:41:05 -0400 Subject: [PATCH] Fix Windows unit test Signed-off-by: Zach Steindler --- cmd/cosign/cli/trustedroot/trustedroot_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/cosign/cli/trustedroot/trustedroot_test.go b/cmd/cosign/cli/trustedroot/trustedroot_test.go index 3b2f4878af6..b5e56f9225e 100644 --- a/cmd/cosign/cli/trustedroot/trustedroot_test.go +++ b/cmd/cosign/cli/trustedroot/trustedroot_test.go @@ -79,6 +79,8 @@ func makeChain(t *testing.T, path string, size int) { fd, err := os.Create(path) checkErr(t, err) + defer fd.Close() + chainCert := &x509.Certificate{ SerialNumber: big.NewInt(1), BasicConstraintsValid: true,