File tree Expand file tree Collapse file tree
developer/amazon-eks-pod-identity/tests
operator/amazon-eks-pod-identity/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,15 @@ before() {
55}
66
77after () {
8+ echo " === DEBUG: Checking carts pods ==="
9+ kubectl get pods -n carts -l app.kubernetes.io/component=service -o wide 2>&1 || true
10+ echo " === DEBUG: Carts configmap ==="
11+ kubectl -n carts get cm carts -o jsonpath=' {.data}' 2>&1 || true
12+ echo " "
13+ echo " === DEBUG: Pod identity associations ==="
14+ aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME} --namespace carts 2>&1 || true
15+
816 # Wait for the carts pod to crash and restart at least once
9- # then check previous container logs for the expected credential error
1017 echo " Waiting for carts pod to crash and restart..."
1118
1219 for i in $( seq 1 36) ; do
@@ -23,6 +30,10 @@ after() {
2330 sleep 10
2431 done
2532
33+ echo " === DEBUG: Final pod state ==="
34+ kubectl get pods -n carts -l app.kubernetes.io/component=service -o wide 2>&1 || true
35+ kubectl describe pods -n carts -l app.kubernetes.io/component=service 2>&1 | tail -30 || true
36+
2637 echo " Failed to find expected credential error after 360s"
2738 exit 1
2839}
Original file line number Diff line number Diff line change @@ -5,8 +5,15 @@ before() {
55}
66
77after () {
8+ echo " === DEBUG: Checking carts pods ==="
9+ kubectl get pods -n carts -l app.kubernetes.io/component=service -o wide 2>&1 || true
10+ echo " === DEBUG: Carts configmap ==="
11+ kubectl -n carts get cm carts -o jsonpath=' {.data}' 2>&1 || true
12+ echo " "
13+ echo " === DEBUG: Pod identity associations ==="
14+ aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME} --namespace carts 2>&1 || true
15+
816 # Wait for the carts pod to crash and restart at least once
9- # then check previous container logs for the expected credential error
1017 echo " Waiting for carts pod to crash and restart..."
1118
1219 for i in $( seq 1 36) ; do
@@ -23,6 +30,10 @@ after() {
2330 sleep 10
2431 done
2532
33+ echo " === DEBUG: Final pod state ==="
34+ kubectl get pods -n carts -l app.kubernetes.io/component=service -o wide 2>&1 || true
35+ kubectl describe pods -n carts -l app.kubernetes.io/component=service 2>&1 | tail -30 || true
36+
2637 echo " Failed to find expected credential error after 360s"
2738 exit 1
2839}
You can’t perform that action at this time.
0 commit comments