Skip to content

Commit

Permalink
add exception for single node; revert vendor code
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisPeriquet committed May 15, 2024
1 parent 2c5f896 commit b114a79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import (
"github.com/sirupsen/logrus"

configv1 "github.com/openshift/api/config/v1"
clientconfigv1 "github.com/openshift/client-go/config/clientset/versioned"
"github.com/openshift/origin/pkg/monitor/monitorapi"
"github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
platformidentification2 "github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
"github.com/openshift/origin/pkg/test/ginkgo/junitapi"
exutil "github.com/openshift/origin/test/extended/util"
"k8s.io/client-go/rest"
)

Expand Down Expand Up @@ -150,7 +152,21 @@ func testUpgradeOperatorStateTransitions(events monitorapi.Intervals, clientConf
availableEqualsFalseAllowed = isInUpgradeWindow(events, eventInterval) && eventInterval.To.Sub(eventInterval.From) < 10*time.Minute
}

if !availableEqualsFalseAllowed {
configClient, err := clientconfigv1.NewForConfig(clientConfig)
if err != nil {
logrus.Warnf("Error creating config client to check for Single Node configuration (unable to make exception): %v", err)
return "", nil
}

isSingleNode, err := exutil.IsSingleNode(context.Background(), configClient)
if err != nil {
logrus.Warnf("Error checking for Single Node configuration (unable to make exception): %v", err)
isSingleNode = false
}

// For now, Single node tests get an exception until we can remove this test:
// 'pods evicted from tainted nodes have pod disruption condition'
if !availableEqualsFalseAllowed && !isSingleNode {
return "", nil
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b114a79

Please sign in to comment.