diff --git a/skaff/datasource/datasourcetest.tmpl b/skaff/datasource/datasourcetest.tmpl index 87db51f1df7a..6e30043c0527 100644 --- a/skaff/datasource/datasourcetest.tmpl +++ b/skaff/datasource/datasourcetest.tmpl @@ -99,6 +99,8 @@ import ( // intricate, they should be unit tested. {{- end }} func Test{{ .DataSource }}ExampleUnitTest(t *testing.T) { + t.Parallel() + testCases := []struct { TestName string Input string @@ -126,7 +128,9 @@ func Test{{ .DataSource }}ExampleUnitTest(t *testing.T) { } for _, testCase := range testCases { + testCase := testCase t.Run(testCase.TestName, func(t *testing.T) { + t.Parallel() got, err := tf{{ .ServicePackage }}.FunctionFromDataSource(testCase.Input) if err != nil && !testCase.Error { diff --git a/skaff/resource/resourcetest.tmpl b/skaff/resource/resourcetest.tmpl index c593091740d0..e44a046b20a9 100644 --- a/skaff/resource/resourcetest.tmpl +++ b/skaff/resource/resourcetest.tmpl @@ -98,6 +98,8 @@ import ( // intricate, they should be unit tested. {{- end }} func Test{{ .Resource }}ExampleUnitTest(t *testing.T) { + t.Parallel() + testCases := []struct { TestName string Input string @@ -125,7 +127,9 @@ func Test{{ .Resource }}ExampleUnitTest(t *testing.T) { } for _, testCase := range testCases { + testCase := testCase t.Run(testCase.TestName, func(t *testing.T) { + t.Parallel() got, err := tf{{ .ServicePackage }}.FunctionFromResource(testCase.Input) if err != nil && !testCase.Error {