mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #25753 from dlorenc/nodecount
Add a flag that lets e2e tests be run against single-node clusters.
This commit is contained in:
commit
31c1825856
@ -44,6 +44,10 @@ var (
|
|||||||
"By default, verify that client and server have exact version match. "+
|
"By default, verify that client and server have exact version match. "+
|
||||||
"You can explicitly set to false if you're, e.g., testing client changes "+
|
"You can explicitly set to false if you're, e.g., testing client changes "+
|
||||||
"for which the server version doesn't make a difference.")
|
"for which the server version doesn't make a difference.")
|
||||||
|
checkNodeCount = flag.Bool("check_node_count", true, ""+
|
||||||
|
"By default, verify that the cluster has at least two nodes."+
|
||||||
|
"You can explicitly set to false if you're, e.g., testing single-node clusters "+
|
||||||
|
"for which the node count is supposed to be one.")
|
||||||
|
|
||||||
ctlCmd = flag.String("ctl", "", "If nonempty, pass this as an argument, and call kubectl. Implies -v. (-test, -cfg, -ctl are mutually exclusive)")
|
ctlCmd = flag.String("ctl", "", "If nonempty, pass this as an argument, and call kubectl. Implies -v. (-test, -cfg, -ctl are mutually exclusive)")
|
||||||
)
|
)
|
||||||
@ -181,7 +185,9 @@ func Test() bool {
|
|||||||
log.Fatal("Testing requested, but e2e cluster not up!")
|
log.Fatal("Testing requested, but e2e cluster not up!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *checkNodeCount {
|
||||||
ValidateClusterSize()
|
ValidateClusterSize()
|
||||||
|
}
|
||||||
|
|
||||||
return finishRunning("Ginkgo tests", exec.Command(filepath.Join(*root, "hack/ginkgo-e2e.sh"), strings.Fields(*testArgs)...))
|
return finishRunning("Ginkgo tests", exec.Command(filepath.Join(*root, "hack/ginkgo-e2e.sh"), strings.Fields(*testArgs)...))
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
check_version_skew
|
check_version_skew
|
||||||
|
check_node_count
|
||||||
concurrent_rc_syncs
|
concurrent_rc_syncs
|
||||||
file_content
|
file_content
|
||||||
file_mode
|
file_mode
|
||||||
|
Loading…
Reference in New Issue
Block a user