Parallelizing a few tests
@@ -271,22 +271,25 @@ func Test_OrchestratorProfile_Validate(t *testing.T) {
}
for testName, test := range tests {
+ t.Run(testName, func(t *testing.T) {
+ t.Parallel()
err := test.properties.validateOrchestratorProfile(test.isUpdate)
if test.expectedError == "" && err == nil {
- continue
+ return
}
if test.expectedError == "" && err != nil {
t.Errorf("%s expected no error but received: %s", testName, err.Error())
- continue
+ return
}
if test.expectedError != "" && err == nil {
t.Errorf("%s expected error: %s, but received no error", testName, test.expectedError)
- continue
+ return
}
if !strings.Contains(err.Error(), test.expectedError) {
t.Errorf("%s expected error: %s but received: %s", testName, test.expectedError, err.Error())
}
+ })
}
}
@@ -319,22 +322,25 @@ func Test_OpenShiftConfig_Validate(t *testing.T) {
}
for testName, test := range tests {
+ t.Run(testName, func(t *testing.T) {
+ t.Parallel()
err := test.properties.validateOrchestratorProfile(test.isUpdate)
if test.expectedError == "" && err == nil {
- continue
+ return
}
if test.expectedError == "" && err != nil {
t.Errorf("%s expected no error but received: %s", testName, err.Error())
- continue
+ return
}
if test.expectedError != "" && err == nil {
t.Errorf("%s expected error: %s, but received no error", testName, test.expectedError)
- continue
+ return
}
if !strings.Contains(err.Error(), test.expectedError) {
t.Errorf("%s expected error to container %s but received: %s", testName, test.expectedError, err.Error())
}
+ })
}
}
