mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
the created path should be closed in test case
This commit is contained in:
@@ -93,6 +93,7 @@ func write(path, contents string, t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create %v.", path)
|
||||
}
|
||||
defer f.Close()
|
||||
_, err = f.WriteString(contents)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to write to %v.", path)
|
||||
|
||||
Reference in New Issue
Block a user