@@ -193,6 +193,8 @@ type NodeTestContextType struct {
...
@@ -193,6 +193,8 @@ type NodeTestContextType struct {
// the node e2e test. If empty, the default one (system.DefaultSpec) is
// the node e2e test. If empty, the default one (system.DefaultSpec) is
// used. The system specs are in test/e2e_node/system/specs/.
// used. The system specs are in test/e2e_node/system/specs/.
SystemSpecNamestring
SystemSpecNamestring
// ExtraEnvs is a map of environment names to values.
ExtraEnvsmap[string]string
}
}
typeCloudConfigstruct{
typeCloudConfigstruct{
...
@@ -332,6 +334,7 @@ func RegisterNodeFlags() {
...
@@ -332,6 +334,7 @@ func RegisterNodeFlags() {
flag.BoolVar(&TestContext.PrepullImages,"prepull-images",true,"If true, prepull images so image pull failures do not cause test failures.")
flag.BoolVar(&TestContext.PrepullImages,"prepull-images",true,"If true, prepull images so image pull failures do not cause test failures.")
flag.StringVar(&TestContext.ImageDescription,"image-description","","The description of the image which the test will be running on.")
flag.StringVar(&TestContext.ImageDescription,"image-description","","The description of the image which the test will be running on.")
flag.StringVar(&TestContext.SystemSpecName,"system-spec-name","","The name of the system spec (e.g., gke) that's used in the node e2e test. The system specs are in test/e2e_node/system/specs/. This is used by the test framework to determine which tests to run for validating the system requirements.")
flag.StringVar(&TestContext.SystemSpecName,"system-spec-name","","The name of the system spec (e.g., gke) that's used in the node e2e test. The system specs are in test/e2e_node/system/specs/. This is used by the test framework to determine which tests to run for validating the system requirements.")
flag.Var(cliflag.NewMapStringString(&TestContext.ExtraEnvs),"extra-envs","The extra environment variables needed for node e2e tests. Format: a list of key=value pairs, e.g., env1=val1,env2=val2")
}
}
// HandleFlags sets up all flags and parses the command line.
// HandleFlags sets up all flags and parses the command line.
@@ -35,6 +35,7 @@ var buildDependencies = flag.Bool("build-dependencies", true, "If true, build al
...
@@ -35,6 +35,7 @@ var buildDependencies = flag.Bool("build-dependencies", true, "If true, build al
varginkgoFlags=flag.String("ginkgo-flags","","Space-separated list of arguments to pass to Ginkgo test runner.")
varginkgoFlags=flag.String("ginkgo-flags","","Space-separated list of arguments to pass to Ginkgo test runner.")
vartestFlags=flag.String("test-flags","","Space-separated list of arguments to pass to node e2e test.")
vartestFlags=flag.String("test-flags","","Space-separated list of arguments to pass to node e2e test.")
varsystemSpecName=flag.String("system-spec-name","",fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.",system.SystemSpecPath))
varsystemSpecName=flag.String("system-spec-name","",fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.",system.SystemSpecPath))
varextraEnvs=flag.String("extra-envs","","The extra environment variables needed for node e2e tests. Format: a list of key=value pairs, e.g., env1=val1,env2=val2")
funcmain(){
funcmain(){
klog.InitFlags(nil)
klog.InitFlags(nil)
...
@@ -63,7 +64,7 @@ func main() {
...
@@ -63,7 +64,7 @@ func main() {
klog.Fatalf("Failed to get k8s root directory: %v",err)
klog.Fatalf("Failed to get k8s root directory: %v",err)
vargubernator=flag.Bool("gubernator",false,"If true, output Gubernator link to view logs")
vargubernator=flag.Bool("gubernator",false,"If true, output Gubernator link to view logs")
varginkgoFlags=flag.String("ginkgo-flags","","Passed to ginkgo to specify additional flags such as --skip=.")
varginkgoFlags=flag.String("ginkgo-flags","","Passed to ginkgo to specify additional flags such as --skip=.")
varsystemSpecName=flag.String("system-spec-name","",fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.",system.SystemSpecPath))
varsystemSpecName=flag.String("system-spec-name","",fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.",system.SystemSpecPath))
varextraEnvs=flag.String("extra-envs","","The extra environment variables needed for node e2e tests. Format: a list of key=value pairs, e.g., env1=val1,env2=val2")
// envs is the type used to collect all node envs. The key is the env name,
// envs is the type used to collect all node envs. The key is the env name,