You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2026/08/24 07:18:45 UTC
(camel-k) branch main updated: chore(e2e): remove clients update
This is an automated email from the ASF dual-hosted git repository.
squakez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new dd4ef9493 chore(e2e): remove clients update
dd4ef9493 is described below
commit dd4ef9493a3d1e35751e56e33597472c7c27fce7
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Mon Aug 24 09:18:39 2026 +0200
chore(e2e): remove clients update
They add no value to the logic as they really test infra. It's enough to test the regular scale.
---
e2e/common/misc/scale_integration_test.go | 66 -------------------------------
1 file changed, 66 deletions(-)
diff --git a/e2e/common/misc/scale_integration_test.go b/e2e/common/misc/scale_integration_test.go
index ec36d4270..9bef518b5 100644
--- a/e2e/common/misc/scale_integration_test.go
+++ b/e2e/common/misc/scale_integration_test.go
@@ -61,71 +61,5 @@ func TestIntegrationScale(t *testing.T) {
// Finally check the readiness condition becomes truthy back
g.Eventually(IntegrationConditionStatus(t, ctx, ns, name, v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
})
-
- t.Run("Scale integration with polymorphic client", func(t *testing.T) {
- scaleClient, err := TestClient(t).ScalesClient()
- g.Expect(err).To(BeNil())
-
- // Patch the integration scale subresource
- patch := "{\"spec\":{\"replicas\":2}}"
- _, err = scaleClient.Scales(ns).Patch(ctx, v1.SchemeGroupVersion.WithResource("integrations"), name, types.MergePatchType, []byte(patch), metav1.PatchOptions{})
- g.Expect(err).To(BeNil())
-
- // Check the readiness condition is still truthy as down-scaling
- g.Expect(IntegrationConditionStatus(t, ctx, ns, name, v1.IntegrationConditionReady)()).To(Equal(corev1.ConditionTrue))
- // Check the Integration scale subresource Spec field
- g.Eventually(IntegrationSpecReplicas(t, ctx, ns, name), TestTimeoutShort).
- Should(gstruct.PointTo(BeNumerically("==", 2)))
- // Then check it cascades into the Deployment scale
- g.Eventually(IntegrationPods(t, ctx, ns, name), TestTimeoutShort).Should(HaveLen(2))
- // Finally check it cascades into the Integration scale subresource Status field
- g.Eventually(IntegrationStatusReplicas(t, ctx, ns, name), TestTimeoutShort).
- Should(gstruct.PointTo(BeNumerically("==", 2)))
- })
-
- t.Run("Scale integration with Camel K client", func(t *testing.T) {
- camel, err := versioned.NewForConfig(TestClient(t).GetConfig())
- g.Expect(err).To(BeNil())
-
- // Getter
- integrationScale, err := camel.CamelV1().Integrations(ns).GetScale(ctx, name, metav1.GetOptions{})
- g.Expect(err).To(BeNil())
- g.Expect(integrationScale.Spec.Replicas).To(BeNumerically("==", 2))
- g.Expect(integrationScale.Status.Replicas).To(BeNumerically("==", 2))
-
- // Setter
- integrationScale.Spec.Replicas = 1
- integrationScale, err = camel.CamelV1().Integrations(ns).UpdateScale(ctx, name, integrationScale, metav1.UpdateOptions{})
- g.Expect(err).To(BeNil())
-
- // Check the readiness condition is still truthy as down-scaling
- g.Expect(IntegrationConditionStatus(t, ctx, ns, name, v1.IntegrationConditionReady)()).To(Equal(corev1.ConditionTrue))
- // Check the Integration scale subresource Spec field
- g.Eventually(IntegrationSpecReplicas(t, ctx, ns, name), TestTimeoutShort).
- Should(gstruct.PointTo(BeNumerically("==", 1)))
- // Then check it cascades into the Deployment scale
- g.Eventually(IntegrationPods(t, ctx, ns, name), TestTimeoutShort).Should(HaveLen(1))
- // Finally check it cascades into the Integration scale subresource Status field
- g.Eventually(IntegrationStatusReplicas(t, ctx, ns, name), TestTimeoutShort).
- Should(gstruct.PointTo(BeNumerically("==", 1)))
- })
-
- t.Run("Scale integration with external image", func(t *testing.T) {
- image := IntegrationPodImage(t, ctx, ns, name)()
- g.Expect(image).NotTo(BeEmpty())
- // Save resources by deleting the integration
- g.Expect(Kamel(t, ctx, "delete", name, "-n", ns).Execute()).To(Succeed())
-
- g.Expect(KamelRun(t, ctx, ns, "files/Java.java",
- "--name", "pre-built",
- "-t", fmt.Sprintf("container.image=%s", image),
- ).Execute()).To(Succeed())
- g.Eventually(IntegrationPhase(t, ctx, ns, "pre-built"), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseRunning))
- g.Expect(ScaleIntegration(t, ctx, ns, "pre-built", 0)).To(Succeed())
- g.Eventually(IntegrationPod(t, ctx, ns, "pre-built")).Should(BeNil())
- g.Expect(ScaleIntegration(t, ctx, ns, "pre-built", 1)).To(Succeed())
- g.Eventually(IntegrationPhase(t, ctx, ns, "pre-built"), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseRunning))
- g.Eventually(IntegrationPodPhase(t, ctx, ns, "pre-built")).Should(Equal(corev1.PodRunning))
- })
})
}