Skip to content

Commit

Permalink
Prepend hostname to collected logs
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Sep 10, 2024
1 parent 8466493 commit ce30914
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func collectLogArtifacts(kc *kubeclient.KubeClient, clusterName string, provider
}
defer podLogs.Close() //nolint:errcheck

output, err := os.Create(fmt.Sprintf("./test/e2e/%s.log", kc.Config.Username+"-"+pod.Name))
output, err := os.Create(fmt.Sprintf("./test/e2e/%s.log", kc.Config.Host+"-"+pod.Name))
if err != nil {
utils.WarnError(fmt.Errorf("failed to create log file for pod %s: %w", pod.Name, err))
continue
Expand All @@ -268,7 +268,7 @@ func collectLogArtifacts(kc *kubeclient.KubeClient, clusterName string, provider
return
}

err = os.WriteFile(filepath.Join("test/e2e", kc.Config.Username+"-"+"clusterctl.log"), output, 0644)
err = os.WriteFile(filepath.Join("test/e2e", kc.Config.Host+"-"+"clusterctl.log"), output, 0644)
if err != nil {
utils.WarnError(fmt.Errorf("failed to write clusterctl log: %w", err))
}
Expand Down

0 comments on commit ce30914

Please sign in to comment.