From d6d38dae13f1c93744537b349a91a74e8f8e579e Mon Sep 17 00:00:00 2001 From: Graham Whaley Date: Fri, 13 Jul 2018 17:44:23 +0100 Subject: [PATCH] cli: update_test: defer remove tmpfile Ensure we remove the tmpfile used for testing. Signed-off-by: Graham Whaley --- cli/update_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/update_test.go b/cli/update_test.go index e2c2e38ce1..713382f8b2 100644 --- a/cli/update_test.go +++ b/cli/update_test.go @@ -111,6 +111,7 @@ func TestUpdateCLIFailure(t *testing.T) { // json decode error f, err := ioutil.TempFile("", "resources") + defer os.Remove(f.Name()) assert.NoError(err) assert.NotNil(f) f.WriteString("no json")