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 2022/12/07 09:53:28 UTC
[camel-k] 02/02: fix(e2e): revert commit
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit eb4e0291f76faee868e4d1abfca4421d48bc40d2
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Mon Dec 5 16:57:51 2022 +0100
fix(e2e): revert commit
69ded0727210195e9250b9b81839490ea50e4de6 because the patch use case is already tested in "Scale integration with polymorphic client". The goal of this test looks to be correctly testing the behavior of a get and a set operation. If it keeps failing, we should investigate the reason why the update is failing instead.
---
e2e/global/common/scale_integration_test.go | 12 +++---------
e2e/support/test_support.go | 7 -------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/e2e/global/common/scale_integration_test.go b/e2e/global/common/scale_integration_test.go
index dd5c65e59..e9789f2ce 100644
--- a/e2e/global/common/scale_integration_test.go
+++ b/e2e/global/common/scale_integration_test.go
@@ -23,7 +23,6 @@ limitations under the License.
package common
import (
- "encoding/json"
"fmt"
"testing"
@@ -96,14 +95,9 @@ func TestIntegrationScale(t *testing.T) {
Expect(integrationScale.Spec.Replicas).To(BeNumerically("==", 2))
Expect(integrationScale.Status.Replicas).To(BeNumerically("==", 2))
- payload := []PatchUInt32Value{{
- Op: "replace",
- Path: "/spec/replicas",
- Value: 1,
- }}
- payloadBytes, _ := json.Marshal(payload)
-
- _, err = camel.CamelV1().Integrations(ns).Patch(TestContext, name, types.JSONPatchType, payloadBytes, metav1.PatchOptions{}, "scale")
+ // Setter
+ integrationScale.Spec.Replicas = 1
+ integrationScale, err = camel.CamelV1().Integrations(ns).UpdateScale(TestContext, name, integrationScale, metav1.UpdateOptions{})
Expect(err).To(BeNil())
// Check the readiness condition is still truthy as down-scaling
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 84c2e2bac..9ccb72408 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -102,13 +102,6 @@ var NoOlmOperatorImage string
var TestContext context.Context
var testClient client.Client
-// patchUint32Value specifies a patch operation for a uint32.
-type PatchUInt32Value struct {
- Op string `json:"op"`
- Path string `json:"path"`
- Value uint32 `json:"value"`
-}
-
var testLocus *testing.T
func setTestLocus(t *testing.T) {