Merge pull request #121636 from sairameshv/121444-fix

[Node E2E Tests] Minor fix to copy the required kubelet, service logs
This commit is contained in:
Kubernetes Prow Robot 2023-10-31 18:10:19 +01:00 committed by GitHub
commit 8f163470ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,7 @@ func getTestArtifacts(host, testDir string) error {
return fmt.Errorf("failed to create log directory %q: %w", logPath, err)
}
// Copy logs (if any) to artifacts/hostname
if _, err := SSH(host, "ls", fmt.Sprintf("%s:%s/results/*.log", GetHostnameOrIP(host), testDir)); err == nil {
if _, err := SSH(host, "ls", fmt.Sprintf("%s/results/*.log", testDir)); err == nil {
if _, err := runSSHCommand(host, "scp", "-r", fmt.Sprintf("%s:%s/results/*.log", GetHostnameOrIP(host), testDir), logPath); err != nil {
return err
}