mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 12:30:46 +01:00
add file descriptor close safely in test
Signed-off-by: Cosrider <cosrider7@gmail.com>
This commit is contained in:
parent
b43db0de6e
commit
46748fd229
@ -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…
Reference in New Issue
Block a user