Skip to content

Commit

Permalink
fix: wait for upgrade to complete
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrabovcin committed Oct 17, 2024
1 parent b251ef4 commit 1b71740
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apptests/appscenarios/traefik_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@ func assertTraefikEndpoints(t *traefik, podList *corev1.PodList) {
listOptions := &ctrlClient.ListOptions{
LabelSelector: selector,
}
err = k8sClient.List(ctx, podList, listOptions)
Expect(err).To(BeNil())
Expect(podList.Items).To(HaveLen(1))

Eventually(func() ([]corev1.Pod, error) {
err := k8sClient.List(ctx, podList, listOptions)
return podList.Items, err
}).WithPolling(5 * time.Second).WithTimeout(time.Minute).Should(HaveLen(1))

By("checking traefik prometheus metrics endpoint")
res := restClientV1Pods.Get().Resource("pods").Namespace(podList.Items[0].Namespace).Name(podList.Items[0].Name + ":9100").SubResource("proxy").Suffix("/metrics").Do(ctx)
Expand Down

0 comments on commit 1b71740

Please sign in to comment.