Skip to content

Commit

Permalink
Fix test artifact writing location, linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Sep 3, 2024
1 parent 9acd492 commit 15ea292
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,16 @@ func verifyControllerUp(kc *kubeclient.KubeClient, labelSelector string, name st
}

if len(deployList.Items) < 1 {
return fmt.Errorf("expected at least 1 %s controller deployment, got %d", name, len(deployList.Items))
return fmt.Errorf("expected at least 1 %s controller deployment, got %d",
name, len(deployList.Items))
}

deployment := deployList.Items[0]

// Ensure the deployment is not being deleted.
if deployment.DeletionTimestamp != nil {
return fmt.Errorf("controller pod: %s deletion timestamp should be nil, got: %v", deployment.Name, deployment.DeletionTimestamp)
return fmt.Errorf("controller pod: %s deletion timestamp should be nil, got: %v",
deployment.Name, deployment.DeletionTimestamp)
}
// Ensure the deployment is running and has the expected name.
if !strings.Contains(deployment.Name, "controller-manager") {
Expand Down Expand Up @@ -220,7 +222,7 @@ func collectLogArtifacts(kc *kubeclient.KubeClient, clusterName string, provider
}
defer podLogs.Close() //nolint:errcheck

output, err := os.Create(fmt.Sprintf("%s.log", pod.Name))
output, err := os.Create(fmt.Sprintf("./test/e2e/%s.log", pod.Name))
if err != nil {
warnError(fmt.Errorf("failed to create log file for pod %s: %w", pod.Name, err))
continue
Expand Down

0 comments on commit 15ea292

Please sign in to comment.