Fix errcheck failures in the unit tests

There were some unchecked errors in some of the unit files relating to
the closure and removal of temporary files.  As the closure and removal
of these files is not really important to whether the next passes or
fails we ignore the errors.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit is contained in:
Mark Ryan 2017-12-12 11:51:17 +00:00
parent db60e32f30
commit d74e3b6633

View File

@ -146,10 +146,10 @@ func TestAppendDeviceNetworkMq(t *testing.T) {
bar, _ := ioutil.TempFile(os.TempDir(), "govmm-qemu-test")
defer func() {
foo.Close()
bar.Close()
os.Remove(foo.Name())
os.Remove(bar.Name())
_ = foo.Close()
_ = bar.Close()
_ = os.Remove(foo.Name())
_ = os.Remove(bar.Name())
}()
netdev := NetDevice{
@ -196,10 +196,10 @@ func TestAppendDeviceNetworkPCIMq(t *testing.T) {
bar, _ := ioutil.TempFile(os.TempDir(), "govmm-qemu-test")
defer func() {
foo.Close()
bar.Close()
os.Remove(foo.Name())
os.Remove(bar.Name())
_ = foo.Close()
_ = bar.Close()
_ = os.Remove(foo.Name())
_ = os.Remove(bar.Name())
}()
netdev := NetDevice{