mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 09:13:29 +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
|
||||
f, err := ioutil.TempFile("", "resources")
|
||||
defer os.Remove(f.Name())
|
||||
assert.NoError(err)
|
||||
assert.NotNil(f)
|
||||
f.WriteString("no json")
|
||||
|
Loading…
Reference in New Issue
Block a user