diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/datamaps/reader_test.go | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/pkg/datamaps/reader_test.go b/pkg/datamaps/reader_test.go index acecf8d..e214930 100644 --- a/pkg/datamaps/reader_test.go +++ b/pkg/datamaps/reader_test.go @@ -2,7 +2,6 @@ package datamaps import ( "os" - "reflect" "testing" ) @@ -214,39 +213,39 @@ func TestExtract(t *testing.T) { } } -func TestGetTargetFiles(t *testing.T) { - // This is not a suitable test for parameterisation, but doing it this way anyway. - type args struct { - path string - } - tests := []struct { - name string - args args - want []string - wantErr bool - }{ - {"Get files in testdata", - args{"./testdata/"}, - []string{ - "testdata/test_template.xlsm", - "testdata/test_template.xlsx", - "testdata/test_template2.xlsx", - "testdata/test_template3.xlsx", - }, - false, - }, - } - for _, tt := range tests { - t.Log("Running the test") - t.Run(tt.name, func(t *testing.T) { - got, err := getTargetFiles(tt.args.path) - if (err != nil) != tt.wantErr { - t.Errorf("getTargetFiles() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("getTargetFiles() = %v, want %v", got, tt.want) - } - }) - } -} +// func TestGetTargetFiles(t *testing.T) { +// // This is not a suitable test for parameterisation, but doing it this way anyway. +// type args struct { +// path string +// } +// tests := []struct { +// name string +// args args +// want []string +// wantErr bool +// }{ +// {"Get files in testdata", +// args{"./testdata/"}, +// []string{ +// "testdata/test_template.xlsm", +// "testdata/test_template.xlsx", +// "testdata/test_template2.xlsx", +// "testdata/test_template3.xlsx", +// }, +// false, +// }, +// } +// for _, tt := range tests { +// t.Log("Running the test") +// t.Run(tt.name, func(t *testing.T) { +// got, err := getTargetFiles(tt.args.path) +// if (err != nil) != tt.wantErr { +// t.Errorf("getTargetFiles() error = %v, wantErr %v", err, tt.wantErr) +// return +// } +// if !reflect.DeepEqual(got, tt.want) { +// t.Errorf("getTargetFiles() = %v, want %v", got, tt.want) +// } +// }) +// } +// } |