diff --git a/pkg/defaults/defaults.go b/pkg/defaults/defaults.go index f549977b..10537d6c 100644 --- a/pkg/defaults/defaults.go +++ b/pkg/defaults/defaults.go @@ -154,7 +154,7 @@ func FromConfig( addProvidesForStep(initialReleaseStep, params) buildSteps = append(buildSteps, initialReleaseStep) - } else if rawStep.TestStepConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration.Upgrade { + } else if rawStep.TestStepConfiguration != nil && rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration != nil { var err error step, err = clusterinstall.E2ETestStep(*rawStep.TestStepConfiguration.OpenshiftInstallerClusterTestConfiguration, *rawStep.TestStepConfiguration, params, podClient, templateClient, secretGetter, artifactDir, jobSpec) if err != nil { @@ -412,7 +412,7 @@ func stepConfigsForBuild(config *api.ReleaseBuildConfiguration, jobSpec *api.Job switch { case test.ContainerTestConfiguration != nil: buildSteps = append(buildSteps, api.StepConfiguration{TestStepConfiguration: test}) - case test.OpenshiftInstallerClusterTestConfiguration != nil && test.OpenshiftInstallerClusterTestConfiguration.Upgrade: + case test.OpenshiftInstallerClusterTestConfiguration != nil: buildSteps = append(buildSteps, api.StepConfiguration{TestStepConfiguration: test}) } } diff --git a/pkg/steps/clusterinstall/clusterinstall.go b/pkg/steps/clusterinstall/clusterinstall.go index ec0a92ae..351625fa 100644 --- a/pkg/steps/clusterinstall/clusterinstall.go +++ b/pkg/steps/clusterinstall/clusterinstall.go @@ -50,22 +50,22 @@ func E2ETestStep( template.Name = testConfig.As - if config.Upgrade { - overrides := make(map[string]string) - for i := range template.Parameters { - p := &template.Parameters[i] - switch p.Name { - case "JOB_NAME_SAFE": - if !params.HasInput(p.Name) { - overrides[p.Name] = testConfig.As - } - case "TEST_COMMAND": - p.Value = testConfig.Commands - case "CLUSTER_TYPE": - p.Value = strings.Split(string(config.ClusterProfile), "-")[0] + overrides := make(map[string]string) + for i := range template.Parameters { + p := &template.Parameters[i] + switch p.Name { + case "JOB_NAME_SAFE": + if !params.HasInput(p.Name) { + overrides[p.Name] = testConfig.As } + case "TEST_COMMAND": + p.Value = testConfig.Commands + case "CLUSTER_TYPE": + p.Value = strings.Split(string(config.ClusterProfile), "-")[0] } + } + if config.Upgrade { // ensure we depend on the release image name := "RELEASE_IMAGE_INITIAL" template.Parameters = append(template.Parameters, templateapi.Parameter{ @@ -90,10 +90,10 @@ func E2ETestStep( Name: name, Value: "true", }) - - params = api.NewOverrideParameters(params, overrides) } + params = api.NewOverrideParameters(params, overrides) + step := steps.TemplateExecutionStep(template, params, podClient, templateClient, artifactDir, jobSpec) subTests, ok := step.(nestedSubTests) if !ok {