Skip to content

Commit 11516cf

Browse files
authored
Merge pull request #30132 from petr-muller/ota-1581-disable-test-on-hcp
OTA-1581: Skip `UpgradeStatus` test on HyperShift
2 parents 5f9c986 + 49e9a67 commit 11516cf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/extended/cli/adm_upgrade/status.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package adm_upgrade
22

33
import (
4+
"context"
5+
46
g "github.com/onsi/ginkgo/v2"
57
o "github.com/onsi/gomega"
68
exutil "github.com/openshift/origin/test/extended/util"
@@ -16,6 +18,15 @@ var _ = g.Describe("[sig-cli][OCPFeatureGate:UpgradeStatus] oc adm upgrade statu
1618
oc := exutil.NewCLIWithoutNamespace("oc-adm-upgrade-status").AsAdmin()
1719

1820
g.It("reports correctly when the cluster is not updating", func() {
21+
22+
// CLI-side oc adm upgrade status does not support HyperShift (assumes MCPs, ignores NodePools, has no knowledge of
23+
// management / hosted cluster separation)
24+
isHyperShift, err := exutil.IsHypershift(context.TODO(), oc.AdminConfigClient())
25+
o.Expect(err).NotTo(o.HaveOccurred())
26+
if isHyperShift {
27+
g.Skip("oc adm upgrade status is not supported on HyperShift")
28+
}
29+
1930
cmd := oc.Run("adm", "upgrade", "status").EnvVar("OC_ENABLE_CMD_UPGRADE_STATUS", "true")
2031
out, err := cmd.Output()
2132
o.Expect(err).NotTo(o.HaveOccurred())

0 commit comments

Comments
 (0)