Skip to content

Commit 01bf4b5

Browse files
committed
add fuzz test for store package
Signed-off-by: Adam Korczynski <[email protected]>
1 parent 0cfd535 commit 01bf4b5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pkg/store/fuzz_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package store
2+
3+
import (
4+
"os"
5+
"testing"
6+
)
7+
8+
func FuzzLoadYAMLByFilePath(f *testing.F) {
9+
f.Fuzz(func(t *testing.T, fileContents []byte) {
10+
err := os.WriteFile("yaml_file.yml", fileContents, 0o600)
11+
if err != nil {
12+
t.Fatal(err)
13+
}
14+
defer os.Remove("yaml_file.yml")
15+
16+
_, _ = LoadYAMLByFilePath("yaml_file.yml")
17+
})
18+
}

0 commit comments

Comments
 (0)