Skip to content

Commit d4c82a5

Browse files
authored
Merge pull request #635 from saikat-royc/dump-gke-node-logs
Enable dump GKE node logs
2 parents 91e2abe + 4d8beb6 commit d4c82a5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/k8s-integration/main.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -560,15 +560,15 @@ func runTestsWithConfig(testDir, testFocus, testSkip, testConfigArg string, clou
560560

561561
artifactsDir, ok := os.LookupEnv("ARTIFACTS")
562562
reportArg := ""
563+
kubetestDumpDir := ""
563564
if ok {
564565
if len(reportPrefix) > 0 {
565-
reportDir := filepath.Join(artifactsDir, reportPrefix)
566-
if err := os.MkdirAll(reportDir, 0755); err != nil {
566+
kubetestDumpDir = filepath.Join(artifactsDir, reportPrefix)
567+
if err := os.MkdirAll(kubetestDumpDir, 0755); err != nil {
567568
return err
568569
}
569-
reportArg = fmt.Sprintf("-report-dir=%s", reportDir)
570570
} else {
571-
reportArg = fmt.Sprintf("-report-dir=%s", artifactsDir)
571+
kubetestDumpDir = artifactsDir
572572
}
573573
}
574574
ginkgoArgs := fmt.Sprintf("--ginkgo.focus=%s --ginkgo.skip=%s", testFocus, testSkip)
@@ -586,6 +586,9 @@ func runTestsWithConfig(testDir, testFocus, testSkip, testConfigArg string, clou
586586
"--check-version-skew=false",
587587
fmt.Sprintf("--test_args=%s", testArgs),
588588
}
589+
if kubetestDumpDir != "" {
590+
kubeTestArgs = append(kubeTestArgs, fmt.Sprintf("--dump=%s", kubetestDumpDir))
591+
}
589592
kubeTestArgs = append(kubeTestArgs, cloudProviderArgs...)
590593

591594
err = runCommand("Running Tests", exec.Command("kubetest", kubeTestArgs...))

0 commit comments

Comments
 (0)