Pass logexporter config through e2e framework

This commit is contained in:
Shyam Jeedigunta
2017-07-18 00:25:10 +02:00
parent 12ba9bdc8c
commit 5cdedd22cf
4 changed files with 15 additions and 8 deletions

View File

@@ -4293,7 +4293,14 @@ func CoreDump(dir string) {
Logf("Skipping dumping logs from cluster")
return
}
cmd := exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump", "log-dump.sh"), dir)
var cmd *exec.Cmd
if TestContext.LogexporterGCSPath != "" {
Logf("Dumping logs from nodes to GCS directly at path: %s", TestContext.LogexporterGCSPath)
cmd = exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump", "log-dump.sh"), dir, TestContext.LogexporterGCSPath)
} else {
Logf("Dumping logs locally to: %s", dir)
cmd = exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump", "log-dump.sh"), dir)
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {