Skip to content

Commit

Permalink
add go changes
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Oct 29, 2024
1 parent 3aaebcc commit 673b4df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e2e/aks-runtime/aks_runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ func TestAKSRuntime(t *testing.T) {

// delete the deployment
deletePolicy := metav1.DeletePropagationForeground
require.NoError(c.Client.CoreV1().Namespaces().Delete(context.Background(), namespace, metav1.DeleteOptions{
if err = c.Client.CoreV1().Namespaces().Delete(context.Background(), namespace, metav1.DeleteOptions{
PropagationPolicy: &deletePolicy,
}))
}); err != nil {
t.Fatalf("Failed to delete namespace %s", &namespace)
}
})

pods, err := c.Client.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{})
Expand Down
4 changes: 4 additions & 0 deletions e2e/internal/az/aks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package az

import (
"encoding/json"
"errors"
"fmt"
"os/exec"
"strings"
Expand All @@ -25,6 +26,9 @@ func NodeImageVersion(clusterName string, rg string) (string, error) {
if err != nil {
return "", err
}
if len(outMap) == 0 {
return "", errors.New("No nodepools could be listed")
}

return strings.TrimSpace(fmt.Sprintf("%s", outMap[0]["nodeImageVersion"])), nil
}

0 comments on commit 673b4df

Please sign in to comment.