Skip to content

Commit

Permalink
UPSTREAM: 98187: Skip PD tests on 1 node cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jsafrane committed Feb 2, 2021
1 parent 3d0efee commit bbd472f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/storage/pd.go
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -84,7 +83,9 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
var err error
nodes, err = e2enode.GetReadySchedulableNodes(cs)
framework.ExpectNoError(err)
gomega.Expect(len(nodes.Items)).To(gomega.BeNumerically(">=", minNodes), fmt.Sprintf("Requires at least %d nodes", minNodes))
if len(nodes.Items) < minNodes {
e2eskipper.Skipf("The test requires %d schedulable nodes, got only %d", minNodes, len(nodes.Items))
}
host0Name = types.NodeName(nodes.Items[0].ObjectMeta.Name)
host1Name = types.NodeName(nodes.Items[1].ObjectMeta.Name)
})
Expand Down

0 comments on commit bbd472f

Please sign in to comment.