Skip to content

Commit 59dcdec

Browse files
Neilhamzaopenshift-cherrypick-robot
authored andcommitted
update test to keep logic as-is
Signed-off-by: nhamza <nhamza@redhat.com>
1 parent 0983abb commit 59dcdec

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

test/extended/operators/certs.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/openshift/library-go/pkg/certs/cert-inspection/certgraphutils"
3333
"github.com/openshift/library-go/pkg/operator/resource/resourceread"
3434

35+
configv1 "github.com/openshift/api/config/v1"
3536
"github.com/openshift/origin/pkg/certs"
3637
"github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
3738
testresult "github.com/openshift/origin/pkg/test/ginkgo/result"
@@ -47,7 +48,6 @@ import (
4748
"k8s.io/apimachinery/pkg/watch"
4849
watchtools "k8s.io/client-go/tools/watch"
4950
e2e "k8s.io/kubernetes/test/e2e/framework"
50-
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
5151
)
5252

5353
const certInspectResultFile = "/tmp/shared/pkiList.json"
@@ -129,17 +129,17 @@ var _ = g.Describe(fmt.Sprintf("[sig-arch][Late][Jira:%q]", "kube-apiserver"), g
129129
// Skip metal jobs if test image pullspec cannot be determined
130130
if jobType.Platform != "metal" || err == nil {
131131
o.Expect(err).NotTo(o.HaveOccurred())
132-
readyMasters, skipped := filterReadyNodes(masters)
133-
if len(skipped) > 0 {
134-
e2e.Logf("Skipping on-disk cert collection for NotReady control-plane nodes: %v", skipped)
132+
topo, topoErr := exutil.GetControlPlaneTopology(oc)
133+
o.Expect(topoErr).NotTo(o.HaveOccurred())
134+
135+
if *topo == configv1.DualReplicaTopologyMode {
136+
readyMasters, _ := filterReadyNodes(masters)
137+
onDiskPKIContent, err = fetchOnDiskCertificates(ctx, kubeClient, oc.AdminConfig(), readyMasters, openshiftTestImagePullSpec)
138+
o.Expect(err).NotTo(o.HaveOccurred())
139+
} else {
140+
onDiskPKIContent, err = fetchOnDiskCertificates(ctx, kubeClient, oc.AdminConfig(), masters, openshiftTestImagePullSpec)
141+
o.Expect(err).NotTo(o.HaveOccurred())
135142
}
136-
if len(readyMasters) == 0 {
137-
e2eskipper.Skipf("No Ready control-plane nodes for on-disk cert collection")
138-
}
139-
140-
onDiskPKIContent, err = fetchOnDiskCertificates(ctx, kubeClient, oc.AdminConfig(), readyMasters, openshiftTestImagePullSpec)
141-
142-
o.Expect(err).NotTo(o.HaveOccurred())
143143
}
144144

145145
actualPKIContent = certgraphanalysis.MergePKILists(ctx, inClusterPKIContent, onDiskPKIContent)

0 commit comments

Comments
 (0)