mirror of https://github.com/k3s-io/k3s
Let local node e2e return error.
Signed-off-by: Lantao Liu <lantaol@google.com>pull/6/head
parent
1a44e26670
commit
55dc6f67d3
|
@ -57,16 +57,18 @@ func main() {
|
|||
ginkgo := filepath.Join(outputDir, "ginkgo")
|
||||
test := filepath.Join(outputDir, "e2e_node.test")
|
||||
|
||||
if *systemSpecName == "" {
|
||||
runCommand(ginkgo, *ginkgoFlags, test, "--", *testFlags)
|
||||
return
|
||||
args := []string{*ginkgoFlags, test, "--", *testFlags}
|
||||
if *systemSpecName != "" {
|
||||
rootDir, err := builder.GetK8sRootDir()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to get k8s root directory: %v", err)
|
||||
}
|
||||
systemSpecFile := filepath.Join(rootDir, systemSpecPath, *systemSpecName+".yaml")
|
||||
args = append(args, fmt.Sprintf("--system-spec-name=%s --system-spec-file=%s", *systemSpecName, systemSpecFile))
|
||||
}
|
||||
rootDir, err := builder.GetK8sRootDir()
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to get k8s root directory: %v", err)
|
||||
if err := runCommand(ginkgo, args...); err != nil {
|
||||
glog.Exitf("Test failed: %v", err)
|
||||
}
|
||||
systemSpecFile := filepath.Join(rootDir, systemSpecPath, *systemSpecName+".yaml")
|
||||
runCommand(ginkgo, *ginkgoFlags, test, "--", fmt.Sprintf("--system-spec-name=%s --system-spec-file=%s", *systemSpecName, systemSpecFile), *testFlags)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue