kubeConfig=flag.String(clientcmd.RecommendedConfigPathFlag,"","Path to kubeconfig containing embeded authinfo. Will use cluster/user info from 'current-context'")
context=&e2e.TestContextType{}
authConfig=flag.String("auth_config","","Path to the auth info file.")
gceConfig=&context.GCEConfig
certDir=flag.String("cert_dir","","Path to the directory containing the certs. Default is empty, which doesn't use certs.")
gceProject=flag.String("gce_project","","The GCE project being used, if applicable")
orderseed=flag.Int64("orderseed",0,"If non-zero, seed of random test shuffle order. (Otherwise random.)")
gceZone=flag.String("gce_zone","","GCE zone being used, if applicable")
reportDir=flag.String("report_dir","","Path to the directory where the JUnit XML reports should be saved. Default is empty, which doesn't generate these reports.")
host=flag.String("host","","The host to connect to")
times=flag.Int("times",1,"Number of times each test is eligible to be run. Individual order is determined by shuffling --times instances of each test using --orderseed (like a multi-deck shoe of cards).")
masterName=flag.String("kube_master","","Name of the kubernetes master. Only required if provider is gce or gke")
testListutil.StringList
provider=flag.String("provider","","The name of the Kubernetes provider")
orderseed=flag.Int64("orderseed",0,"If non-zero, seed of random test shuffle order. (Otherwise random.)")
repoRoot=flag.String("repo_root","./","Root directory of kubernetes repository, for finding test files. Default assumes working directory is repository root")
reportDir=flag.String("report_dir","","Path to the directory where the JUnit XML reports should be saved. Default is empty, which doesn't generate these reports.")
times=flag.Int("times",1,"Number of times each test is eligible to be run. Individual order is determined by shuffling --times instances of each test using --orderseed (like a multi-deck shoe of cards).")
testListutil.StringList
)
)
funcinit(){
funcinit(){
flag.VarP(&testList,"test","t","Test to execute (may be repeated or comma separated list of tests.) Defaults to running all tests.")
flag.VarP(&testList,"test","t","Test to execute (may be repeated or comma separated list of tests.) Defaults to running all tests.")
flag.StringVar(&context.KubeConfig,clientcmd.RecommendedConfigPathFlag,"","Path to kubeconfig containing embeded authinfo.")
flag.StringVar(&context.KubeContext,clientcmd.FlagContext,"","kubeconfig context to use/override. If unset, will use value from 'current-context'")
flag.StringVar(&context.AuthConfig,"auth_config","","Path to the auth info file.")
flag.StringVar(&context.CertDir,"cert_dir","","Path to the directory containing the certs. Default is empty, which doesn't use certs.")
flag.StringVar(&context.Host,"host","","The host to connect to")
flag.StringVar(&context.RepoRoot,"repo_root","./","Root directory of kubernetes repository, for finding test files. Default assumes working directory is repository root")
flag.StringVar(&context.Provider,"provider","","The name of the Kubernetes provider")
flag.StringVar(&gceConfig.MasterName,"kube_master","","Name of the kubernetes master. Only required if provider is gce or gke")
flag.StringVar(&gceConfig.ProjectID,"gce_project","","The GCE project being used, if applicable")
flag.StringVar(&gceConfig.Zone,"gce_zone","","GCE zone being used, if applicable")
}
}
funcmain(){
funcmain(){
util.InitFlags()
util.InitFlags()
goruntime.GOMAXPROCS(goruntime.NumCPU())
goruntime.GOMAXPROCS(goruntime.NumCPU())
if*provider==""{
ifcontext.Provider==""{
glog.Info("The --provider flag is not set. Treating as a conformance test. Some tests may not be run.")
glog.Info("The --provider flag is not set. Treating as a conformance test. Some tests may not be run.")
os.Exit(1)
os.Exit(1)
}
}
...
@@ -58,10 +63,5 @@ func main() {
...
@@ -58,10 +63,5 @@ func main() {
glog.Error("Invalid --times (negative or no testing requested)!")
glog.Error("Invalid --times (negative or no testing requested)!")