mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #10015 from marekbiskup/allow-networking-test-on-one-node
enable networking test on a one-node local cluster
This commit is contained in:
commit
f6a66c2a50
@ -151,8 +151,19 @@ var _ = Describe("Networking", func() {
|
||||
filterNodes(nodes, func(node api.Node) bool {
|
||||
return isNodeReadySetAsExpected(&node, true)
|
||||
})
|
||||
if len(nodes.Items) < 2 {
|
||||
Failf("Less than two nodes were found Ready.")
|
||||
|
||||
if len(nodes.Items) == 0 {
|
||||
Failf("No Ready nodes found.")
|
||||
}
|
||||
if len(nodes.Items) == 1 {
|
||||
// in general, the test requires two nodes. But for local development, often a one node cluster
|
||||
// is created, for simplicity and speed. (see issue #10012). We permit one-node test
|
||||
// only in some cases
|
||||
if !providerIs("local") {
|
||||
Failf(fmt.Sprintf("The test requires two Ready nodes on %s, but found just one.", testContext.Provider))
|
||||
}
|
||||
Logf("Only one ready node is detected. The test has limited scope in such setting. " +
|
||||
"Rerun it with at least two nodes to get complete coverage.")
|
||||
}
|
||||
|
||||
podNames := LaunchNetTestPodPerNode(f, nodes, svcname, "1.4")
|
||||
|
Loading…
Reference in New Issue
Block a user