mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-01 01:33:20 +00:00
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:
parent
1f8f7629a0
commit
e45f591219
@ -762,6 +762,7 @@ func TestEnvShowSettingsInvalidFile(t *testing.T) {
|
|||||||
|
|
||||||
tmpfile, err := ioutil.TempFile("", "envShowSettings-")
|
tmpfile, err := ioutil.TempFile("", "envShowSettings-")
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
defer os.Remove(tmpfile.Name())
|
||||||
|
|
||||||
// close the file
|
// close the file
|
||||||
tmpfile.Close()
|
tmpfile.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user