mirror of https://github.com/k3s-io/k3s
Merge pull request #53219 from krzyzacy/node-logs
Automatic merge from submit-queue (batch tested with PRs 51021, 53225, 53094, 53219). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Let node test subcommand be an arg Currently node-test will strip off the 1st arg if subcommand is not specified, i.e. both [Jenkins](https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/jenkins/e2e-node-jenkins.sh#L44) and [kubetest](https://github.com/kubernetes/test-infra/blob/master/kubetest/e2e.go#L524) -- make it a flag will be clearer. /assign @Random-Liu @yguo0905pull/6/head
commit
8ca56cb696
|
@ -32,7 +32,7 @@ TIMEOUT=${TIMEOUT:-"45m"}
|
||||||
|
|
||||||
mkdir -p ${ARTIFACTS}
|
mkdir -p ${ARTIFACTS}
|
||||||
|
|
||||||
go run test/e2e_node/runner/remote/run_remote.go conformance \
|
go run test/e2e_node/runner/remote/run_remote.go --test-suite=conformance \
|
||||||
--logtostderr --vmodule=*=4 --ssh-env="gce" --ssh-user="$GCE_USER" \
|
--logtostderr --vmodule=*=4 --ssh-env="gce" --ssh-user="$GCE_USER" \
|
||||||
--zone="$GCE_ZONE" --project="$GCE_PROJECT" --hosts="$GCE_HOSTS" \
|
--zone="$GCE_ZONE" --project="$GCE_PROJECT" --hosts="$GCE_HOSTS" \
|
||||||
--images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
|
--images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
|
||||||
|
|
|
@ -45,6 +45,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var testArgs = flag.String("test_args", "", "Space-separated list of arguments to pass to Ginkgo test runner.")
|
var testArgs = flag.String("test_args", "", "Space-separated list of arguments to pass to Ginkgo test runner.")
|
||||||
|
var testSuite = flag.String("test-suite", "default", "Test suite the runner initializes with. Currently support default|conformance")
|
||||||
var instanceNamePrefix = flag.String("instance-name-prefix", "", "prefix for instance names")
|
var instanceNamePrefix = flag.String("instance-name-prefix", "", "prefix for instance names")
|
||||||
var zone = flag.String("zone", "", "gce zone the hosts live in")
|
var zone = flag.String("zone", "", "gce zone the hosts live in")
|
||||||
var project = flag.String("project", "", "gce project the hosts live in")
|
var project = flag.String("project", "", "gce project the hosts live in")
|
||||||
|
@ -143,27 +144,18 @@ type internalGCEImage struct {
|
||||||
tests []string
|
tests []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseFlags parse subcommands and flags
|
func main() {
|
||||||
func parseFlags() {
|
flag.Parse()
|
||||||
if len(os.Args) <= 1 {
|
switch *testSuite {
|
||||||
glog.Fatalf("Too few flags specified: %v", os.Args)
|
|
||||||
}
|
|
||||||
// Parse subcommand.
|
|
||||||
subcommand := os.Args[1]
|
|
||||||
switch subcommand {
|
|
||||||
case "conformance":
|
case "conformance":
|
||||||
suite = remote.InitConformanceRemote()
|
suite = remote.InitConformanceRemote()
|
||||||
// TODO: Add subcommand for node soaking, node conformance, cri validation.
|
// TODO: Add subcommand for node soaking, node conformance, cri validation.
|
||||||
default:
|
case "default":
|
||||||
// Use node e2e suite by default if no subcommand is specified.
|
// Use node e2e suite by default if no subcommand is specified.
|
||||||
suite = remote.InitNodeE2ERemote()
|
suite = remote.InitNodeE2ERemote()
|
||||||
|
default:
|
||||||
|
glog.Fatalf("--test-suite must be one of default or conformance")
|
||||||
}
|
}
|
||||||
// Parse test flags.
|
|
||||||
flag.CommandLine.Parse(os.Args[2:])
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
parseFlags()
|
|
||||||
|
|
||||||
rand.Seed(time.Now().UTC().UnixNano())
|
rand.Seed(time.Now().UTC().UnixNano())
|
||||||
if *buildOnly {
|
if *buildOnly {
|
||||||
|
|
Loading…
Reference in New Issue