Browse Source

add file descriptor close safely in test

Signed-off-by: Cosrider <cosrider7@gmail.com>
pull/2454/head
Cosrider 2 years ago committed by Johannes 'fish' Ziemke
parent
commit
46748fd229
  1. 2
      collector/os_release_test.go

2
collector/os_release_test.go

@ -48,6 +48,8 @@ func TestParseOSRelease(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer osReleaseFile.Close()
got, err := parseOSRelease(osReleaseFile)
if err != nil {
t.Fatal(err)

Loading…
Cancel
Save