Skip to content

Commit

Permalink
Merge pull request #298 from RomanBednar/platform-check-4.11
Browse files Browse the repository at this point in the history
 Bug 2102576: DefaultStorageClassController reports fake message on azure and openstack
  • Loading branch information
openshift-merge-robot committed Aug 11, 2022
2 parents df4996d + a61b647 commit 8377efd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pkg/operator/defaultstorageclass/controller.go
Expand Up @@ -196,6 +196,10 @@ func newStorageClassForCluster(infrastructure *configv1.Infrastructure) (*storag
storageClassFile = "storageclasses/gcp.yaml"
case configv1.VSpherePlatformType:
storageClassFile = "storageclasses/vsphere.yaml"
case configv1.AzurePlatformType:
return nil, supportedByCSIError
case configv1.OpenStackPlatformType:
return nil, supportedByCSIError
case configv1.OvirtPlatformType:
return nil, supportedByCSIError
default:
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/defaultstorageclass/controller_test.go
Expand Up @@ -243,7 +243,7 @@ func TestSync(t *testing.T) {
expectErr: true,
},
{
// azurestackhub is not recognized by sync as a valid platform
// The controller syncs fine when azurestackhub is used and does not create a storage class
name: "azurestackhub",
initialObjects: testObjects{
storage: getCR(),
Expand All @@ -252,7 +252,7 @@ func TestSync(t *testing.T) {
expectedObjects: testObjects{
storage: getCR(
withFalseConditions(conditionsPrefix+opv1.OperatorStatusTypeProgressing),
withTrueConditions(conditionsPrefix+"Disabled", conditionsPrefix+opv1.OperatorStatusTypeAvailable),
withTrueConditions(conditionsPrefix+opv1.OperatorStatusTypeAvailable),
),
},
expectErr: false,
Expand Down

0 comments on commit 8377efd

Please sign in to comment.