From e39fe5dc067c799753ae40beb37b9ff32851e10b Mon Sep 17 00:00:00 2001 From: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:15:38 +0000 Subject: [PATCH] Add defer testFile.Close(). --- integration_test/ops_agent_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/integration_test/ops_agent_test.go b/integration_test/ops_agent_test.go index 87e70374c7..cef1c33f33 100644 --- a/integration_test/ops_agent_test.go +++ b/integration_test/ops_agent_test.go @@ -4716,6 +4716,7 @@ func TestPartialSuccess(t *testing.T) { if err != nil { t.Fatal(err) } + defer testFile.Close() if err = gce.UploadContent(ctx, logger, vm, testFile, logPath); err != nil { t.Fatal(err) }