mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-01 17:52:40 +00:00
cli: update_test: defer remove tmpfile
Ensure we remove the tmpfile used for testing. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
parent
14d25b82a4
commit
d6d38dae13
@ -111,6 +111,7 @@ func TestUpdateCLIFailure(t *testing.T) {
|
|||||||
|
|
||||||
// json decode error
|
// json decode error
|
||||||
f, err := ioutil.TempFile("", "resources")
|
f, err := ioutil.TempFile("", "resources")
|
||||||
|
defer os.Remove(f.Name())
|
||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
assert.NotNil(f)
|
assert.NotNil(f)
|
||||||
f.WriteString("no json")
|
f.WriteString("no json")
|
||||||
|
Loading…
Reference in New Issue
Block a user