func NewCommand()

in cmd/e2e-test/rune2e/command.go [57:90]


func NewCommand() *command {
	cmd := &command{
		clusterName:       fmt.Sprintf("%s-%s", defaultClusterNamePrefix, strings.ReplaceAll(defaultK8sVersion, ".", "-")),
		cni:               defaultCNI,
		k8sVersion:        defaultK8sVersion,
		nodeadmAMDURL:     defaultNodeadmAMDURL,
		nodeadmARMURL:     defaultNodeadmARMURL,
		skipCleanup:       false,
		subCmd:            flaggy.NewSubcommand("run-e2e"),
		testProcs:         defaultTestProcs,
		timeout:           defaultTimeout,
		testsBinaryOrPath: defaultTestsBinaryOrPath,
	}
	cmd.subCmd.Description = "Run E2E tests"
	cmd.subCmd.String(&cmd.clusterName, "n", "name", "Cluster name (optional)")
	cmd.subCmd.String(&cmd.region, "r", "region", "AWS region (optional)")
	cmd.subCmd.String(&cmd.k8sVersion, "k", "kubernetes-version", "Kubernetes version (optional)")
	cmd.subCmd.String(&cmd.cni, "c", "cni", "CNI plugin (optional)")
	cmd.subCmd.String(&cmd.nodeadmAMDURL, "", "nodeadm-amd-url", "NodeADM AMD URL (optional)")
	cmd.subCmd.String(&cmd.nodeadmARMURL, "", "nodeadm-arm-url", "NodeADM ARM URL (optional)")
	cmd.subCmd.String(&cmd.logsBucket, "b", "logs-bucket", "S3 bucket for logs (optional)")
	cmd.subCmd.String(&cmd.artifactsDir, "a", "artifacts-dir", "Directory for artifacts (optional, defaults to a new temp directory)")
	cmd.subCmd.String(&cmd.skippedTests, "s", "skipped-tests", "ginkgo regex to skip tests (optional)")
	cmd.subCmd.Duration(&cmd.timeout, "", "timeout", "Timeout for the test (optional)")
	cmd.subCmd.String(&cmd.testLabelFilter, "f", "test-filter", "Filter for the test (optional)")
	cmd.subCmd.Bool(&cmd.skipCleanup, "", "skip-cleanup", "Skip cleanup (optional)")
	cmd.subCmd.String(&cmd.testsBinaryOrPath, "", "tests-binary", "Path to the tests binary (optional)")
	cmd.subCmd.Bool(&cmd.noColor, "", "no-color", "Disable color output (optional)")
	cmd.subCmd.Int(&cmd.testProcs, "p", "procs", "Number of processes to run (optional)")
	cmd.subCmd.String(&cmd.setupConfigFile, "", "setup-config", "Path to a YAML file containing cluster.TestResources configuration (optional)")
	cmd.subCmd.String(&cmd.testConfigFile, "", "test-config", "Path to a YAML file containing suite.TestConfig configuration (optional)")
	cmd.subCmd.String(&cmd.ginkgoBinaryPath, "", "ginkgo-binary", "Path to the ginkgo binary (defaults to the ginkgo binary in the same folder as e2e-test or in the PATH)")
	return cmd
}