-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Open
Copy link
Labels
blocked-needs-validationIssue need triage and validationIssue need triage and validationbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Bug description
E2E tests are unstable due to GlobalTenantResource should replicate resources to all Tenants.
Logs:
Creating a GlobalTenantResource object [It] should replicate resources to all Tenants
/home/runner/work/capsule/capsule/e2e/globaltenantresource_test.go:185
[FAILED] Timed out after 40.001s.
Expected
<[]v1.Secret | len:0, cap:0>: nil
to have length 4
Additional context
Example e2e job here
Source:
capsule/e2e/globaltenantresource_test.go
Lines 185 to 217 in ee5c8f0
It("should replicate resources to all Tenants", func() { | |
solarNs, windNs := []string{"solar-one", "solar-two", "solar-three"}, []string{"wind-one", "wind-two", "wind-three"} | |
By("creating solar Namespaces", func() { | |
for _, ns := range solarNs { | |
NamespaceCreation(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}, solar.Spec.Owners[0], defaultTimeoutInterval).Should(Succeed()) | |
} | |
}) | |
By("creating wind Namespaces", func() { | |
for _, ns := range windNs { | |
NamespaceCreation(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}, wind.Spec.Owners[0], defaultTimeoutInterval).Should(Succeed()) | |
} | |
}) | |
for _, ns := range append(solarNs, windNs...) { | |
By(fmt.Sprintf("waiting for replicated resources in %s Namespace", ns), func() { | |
Eventually(func() []corev1.Secret { | |
r, err := labels.NewRequirement("labels.energy.io", selection.DoubleEquals, []string{"replicate"}) | |
if err != nil { | |
return nil | |
} | |
secrets := corev1.SecretList{} | |
err = k8sClient.List(context.TODO(), &secrets, &client.ListOptions{LabelSelector: labels.NewSelector().Add(*r), Namespace: ns}) | |
if err != nil { | |
return nil | |
} | |
return secrets.Items | |
}, defaultTimeoutInterval, defaultPollInterval).Should(HaveLen(4)) | |
}) | |
} |
Metadata
Metadata
Assignees
Labels
blocked-needs-validationIssue need triage and validationIssue need triage and validationbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers