Merge pull request #32093 from guangxuli/kube_secret_test

Automatic merge from submit-queue

the created path should be closed in test case
pull/6/head
Kubernetes Submit Queue 2016-09-08 05:41:21 -07:00 committed by GitHub
commit 91f04c765b
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ func write(path, contents string, t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("Failed to create %v.", path) t.Fatalf("Failed to create %v.", path)
} }
defer f.Close()
_, err = f.WriteString(contents) _, err = f.WriteString(contents)
if err != nil { if err != nil {
t.Fatalf("Failed to write to %v.", path) t.Fatalf("Failed to write to %v.", path)