Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rashmi Gottipati <[email protected]>
  • Loading branch information
rashmigottipati committed Jun 27, 2024
1 parent 7ca8842 commit d84277f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
mmsemver "github.com/Masterminds/semver/v3"
bsemver "github.com/blang/semver/v4"
"github.com/go-logr/logr"
crdupgradesafety "github.com/operator-framework/rukpak/pkg/preflights/crdupgradesafety"

Check failure on line 33 in internal/controllers/clusterextension_controller.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s dot -s default -s prefix(github.com/operator-framework) -s prefix(github.com/operator-framework/operator-controller) --custom-order (gci)
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chartutil"
Expand Down Expand Up @@ -64,7 +65,6 @@ import (
"github.com/operator-framework/operator-registry/alpha/property"
rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2"
registryv1handler "github.com/operator-framework/rukpak/pkg/handler"

Check failure on line 67 in internal/controllers/clusterextension_controller.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s dot -s default -s prefix(github.com/operator-framework) -s prefix(github.com/operator-framework/operator-controller) --custom-order (gci)
crdupgradesafety "github.com/operator-framework/rukpak/pkg/preflights/crdupgradesafety"
rukpaksource "github.com/operator-framework/rukpak/pkg/source"
"github.com/operator-framework/rukpak/pkg/storage"
"github.com/operator-framework/rukpak/pkg/util"
Expand Down Expand Up @@ -328,10 +328,12 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
}

for _, preflight := range r.Preflights {
if _, ok := preflight.(*crdupgradesafety.Preflight); ok && ext.Spec.Preflight.CRDUpgradeSafety.Disabled {
// Skip this preflight check because it is of type *crdupgradesafety.Preflight and the CRD Upgrade Safety
// preflight check has been disabled
continue
if ext.Spec.Preflight != nil {
if _, ok := preflight.(*crdupgradesafety.Preflight); ok && ext.Spec.Preflight.CRDUpgradeSafety.Disabled {
// Skip this preflight check because it is of type *crdupgradesafety.Preflight and the CRD Upgrade Safety
// preflight check has been disabled
continue
}
}
switch state {
case stateNeedsInstall:
Expand Down

0 comments on commit d84277f

Please sign in to comment.