@@ -35,15 +35,17 @@ func TestClusterToAdvancedCluster(t *testing.T) {
3535 assert .NotEmpty (t , inputFiles )
3636 for _ , inputFile := range inputFiles {
3737 testName := strings .TrimSuffix (filepath .Base (inputFile ), inSuffix )
38- inConfig , err := afero .ReadFile (fs , inputFile )
39- require .NoError (t , err )
40- outConfig , err := hcl .ClusterToAdvancedCluster (inConfig )
41- if err == nil {
42- g .Assert (t , testName , outConfig )
43- } else {
44- errMsg , found := errMap [testName ]
45- assert .True (t , found , "error not found for test %s" , testName )
46- assert .Contains (t , err .Error (), errMsg )
47- }
38+ t .Run (testName , func (t * testing.T ) {
39+ inConfig , err := afero .ReadFile (fs , inputFile )
40+ require .NoError (t , err )
41+ outConfig , err := hcl .ClusterToAdvancedCluster (inConfig )
42+ if err == nil {
43+ g .Assert (t , testName , outConfig )
44+ } else {
45+ errMsg , found := errMap [testName ]
46+ assert .True (t , found , "error not found for test %s" , testName )
47+ assert .Contains (t , err .Error (), errMsg )
48+ }
49+ })
4850 }
4951}
0 commit comments