Skip to content

Commit

Permalink
fix tests where mode is not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
eifrach committed Mar 18, 2024
1 parent a7d84d5 commit 511aebf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 4 additions & 2 deletions internal/featuresupport/features_misc.go
Expand Up @@ -63,8 +63,10 @@ func (feature *SnoFeature) getIncompatibleArchitectures(openshiftVersion *string
}

func (feature *SnoFeature) getFeatureActiveLevel(cluster *common.Cluster, _ *models.InfraEnv, _ *models.V2ClusterUpdateParams, _ *models.InfraEnvUpdateParams) featureActiveLevel {
if cluster != nil && swag.StringValue(cluster.HighAvailabilityMode) == models.ClusterHighAvailabilityModeNone {
return activeLevelActive
if cluster != nil && cluster.HighAvailabilityMode != nil {
if *cluster.HighAvailabilityMode == models.ClusterHighAvailabilityModeNone {
return activeLevelActive
}
}
return activeLevelNotActive
}
Expand Down
6 changes: 4 additions & 2 deletions internal/featuresupport/features_networking.go
Expand Up @@ -95,8 +95,10 @@ func (feature *ClusterManagedNetworkingFeature) getSupportLevel(filters SupportL
if !isFeatureCompatibleWithArchitecture(feature, filters.OpenshiftVersion, swag.StringValue(filters.CPUArchitecture)) {
return models.SupportLevelUnavailable
}
if *filters.HighAvailabilityMode == models.ClusterHighAvailabilityModeNone {
return models.SupportLevelUnavailable
if filters.HighAvailabilityMode != nil {
if *filters.HighAvailabilityMode == models.ClusterHighAvailabilityModeNone {
return models.SupportLevelUnavailable
}
}
if swag.StringValue(filters.CPUArchitecture) == models.ClusterCPUArchitectureArm64 {
isNotAvailable, err := common.BaseVersionLessThan("4.11", filters.OpenshiftVersion)
Expand Down
6 changes: 1 addition & 5 deletions subsystem/feature_support_levels_test.go
Expand Up @@ -262,11 +262,7 @@ var _ = Describe("Feature support levels API", func() {
Expect(err).ShouldNot(HaveOccurred())

for featureID, supportLevel := range response.Payload.Features {
filters := featuresupport.SupportLevelFilters{
OpenshiftVersion: version,
CPUArchitecture: swag.String(arch),
HighAvailabilityMode: swag.String(""),
}
filters := featuresupport.SupportLevelFilters{OpenshiftVersion: version, CPUArchitecture: swag.String(arch)}
featureSupportLevel := featuresupport.GetSupportLevel(models.FeatureSupportLevelID(featureID), filters)
Expect(featureSupportLevel).To(BeEquivalentTo(supportLevel))
}
Expand Down
2 changes: 1 addition & 1 deletion subsystem/kubeapi_test.go
Expand Up @@ -1369,7 +1369,7 @@ var _ = Describe("[kube-api]cluster installation", func() {
}, "2m", "2s").Should(Equal(0))
})

It("deploy external platform", func() {
FIt("deploy external platform", func() {
By("Upload CCM manifests for OCI")
name := "cloud-controller-manager"
namespace := fmt.Sprintf("oci-%s", name)
Expand Down

0 comments on commit 511aebf

Please sign in to comment.