Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
kata-env: Do not leave temp files on test
Browse files Browse the repository at this point in the history
One of the test cases was not defer removing the tmpfile
it uses. Add that defer.

Signed-off-by: Graham Whaley <[email protected]>
  • Loading branch information
Graham Whaley authored and Eric Ernst committed Aug 23, 2018
1 parent 89e22e5 commit ceac6fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cli/kata-env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ func TestEnvShowSettingsInvalidFile(t *testing.T) {

tmpfile, err := ioutil.TempFile("", "envShowSettings-")
assert.NoError(t, err)
defer os.Remove(tmpfile.Name())

// close the file
tmpfile.Close()
Expand Down

0 comments on commit ceac6fd

Please sign in to comment.