fuzz_test.go 555 B

1234567891011121314151617181920212223242526272829
  1. // +build fuzz
  2. // fuzz test data is stored in Amazon S3.
  3. package ini_test
  4. import (
  5. "path/filepath"
  6. "testing"
  7. "github.com/aws/aws-sdk-go/internal/ini"
  8. )
  9. // TestFuzz is used to test for crashes and not validity of the input
  10. func TestFuzz(t *testing.T) {
  11. paths, err := filepath.Glob("testdata/fuzz/*")
  12. if err != nil {
  13. t.Errorf("expected no error, but received %v", err)
  14. }
  15. if paths == nil {
  16. t.Errorf("expected fuzz files, but received none")
  17. }
  18. for _, path := range paths {
  19. t.Run(path, func(t *testing.T) {
  20. ini.OpenFile(path)
  21. })
  22. }
  23. }