From d74e3b66338c190688b3cd7a898426fb55f42dbf Mon Sep 17 00:00:00 2001 From: Mark Ryan Date: Tue, 12 Dec 2017 11:51:17 +0000 Subject: [PATCH] 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 --- qemu/qemu_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qemu/qemu_test.go b/qemu/qemu_test.go index 8a97fd1d5..51269eabb 100644 --- a/qemu/qemu_test.go +++ b/qemu/qemu_test.go @@ -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{