Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ presubmits:
- hack/ci/run-e2e-tests.sh
resources:
requests:
memory: 4Gi
cpu: 2
memory: 8Gi
cpu: 4
# docker-in-docker needs privileged mode
securityContext:
privileged: true
Expand All @@ -114,8 +114,8 @@ presubmits:
value: main
resources:
requests:
memory: 4Gi
cpu: 2
memory: 8Gi
cpu: 4
# docker-in-docker needs privileged mode
securityContext:
privileged: true
2 changes: 1 addition & 1 deletion hack/ci/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ -n "${KCP_TAG:-}" ]; then
rm -rf "$tmpdir"

# kcp's containers are tagged with the first 8 characters of the Git hash
KCP_TAG="${KCP_TAG:0:8}"
KCP_TAG="${KCP_TAG:0:9}"
fi

echo "kcp image tag.......: $KCP_TAG"
Expand Down
9 changes: 7 additions & 2 deletions test/utils/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func WaitForPods(t *testing.T, ctx context.Context, client ctrlruntimeclient.Cli
}

for _, pod := range pods.Items {
if !podIsReady(pod) {
if !podIsReady(t, pod) {
return false, nil
}
}
Expand All @@ -57,12 +57,14 @@ func WaitForPods(t *testing.T, ctx context.Context, client ctrlruntimeclient.Cli
t.Log("Pods are ready.")
}

func podIsReady(pod corev1.Pod) bool {
func podIsReady(t *testing.T, pod corev1.Pod) bool {
for _, cond := range pod.Status.Conditions {
if cond.Type == corev1.PodReady {
return cond.Status == corev1.ConditionTrue
}
}
t.Logf("Pod %s/%s does not have PodReady condition", pod.Namespace, pod.Name)
t.Logf("Pod conditions: %+v", pod.Status.Conditions)

return false
}
Expand All @@ -73,6 +75,9 @@ func WaitForObject(t *testing.T, ctx context.Context, client ctrlruntimeclient.C

err := wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 3*time.Minute, false, func(ctx context.Context) (done bool, err error) {
err = client.Get(ctx, key, obj)
if err != nil {
t.Logf("Waiting for %T to be available: %v", obj, err)
}
return err == nil, nil
})
if err != nil {
Expand Down