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:
Graham Whaley 2018-07-13 17:44:23 +01:00
parent 14d25b82a4
commit d6d38dae13

View File

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