kata-env: Do not leave temp files on test

One of the test cases was not defer removing the tmpfile
it uses. Add that defer.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
Graham Whaley 2018-07-11 17:10:06 +01:00
parent 1f8f7629a0
commit e45f591219

View File

@ -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()