Unverified Commit 64a9cc8f authored by CYJiang's avatar CYJiang Committed by GitHub
Browse files

cmd: add missing file close in tests (#10179)

parent f50d6912
...@@ -415,6 +415,7 @@ func TestGetModelfileName(t *testing.T) { ...@@ -415,6 +415,7 @@ func TestGetModelfileName(t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("temp modelfile creation failed: %v", err) t.Fatalf("temp modelfile creation failed: %v", err)
} }
defer tempFile.Close()
expectedFilename = tempFile.Name() expectedFilename = tempFile.Name()
err = cmd.Flags().Set("file", expectedFilename) err = cmd.Flags().Set("file", expectedFilename)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment