diff --git a/util/test/test.go b/util/test/test.go index ab5e4a93..23f1c921 100644 --- a/util/test/test.go +++ b/util/test/test.go @@ -157,7 +157,7 @@ func SQLFromReader(m sqlmock.Sqlmock, r io.Reader) error { } func RunWithClientExpectResults(ctx context.Context, c client.Client, m sqlmock.Sqlmock, dir string, exts []string) error { - tcases, err := getFiles(dir, exts) + tcases, err := GetCases(dir, exts) if err != nil { return err } @@ -218,7 +218,7 @@ type Case struct { rspfiles []string } -func getFiles(dir string, exts []string) ([]Case, error) { +func GetCases(dir string, exts []string) ([]Case, error) { var tcases []Case entries, err := os.ReadDir(dir) if len(entries) == 0 && err != nil { @@ -263,7 +263,7 @@ func getFiles(dir string, exts []string) ([]Case, error) { } for _, dir = range dirs { - ntcases, err := getFiles(dir, exts) + ntcases, err := GetCases(dir, exts) if len(ntcases) == 0 && err != nil { return tcases, err } else if len(ntcases) == 0 { diff --git a/util/test/test_test.go b/util/test/test_test.go index 58fa2b4b..c72bac63 100644 --- a/util/test/test_test.go +++ b/util/test/test_test.go @@ -56,8 +56,8 @@ func Test_SQLFromFile(t *testing.T) { } } -func Test_getFiles(t *testing.T) { - files, err := getFiles("testdata/", nil) +func Test_GetCases(t *testing.T) { + files, err := GetCases("testdata/", nil) if err != nil { t.Fatal(err) }