This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 735f2f7a9948900bc7625a88019fca3e9e17f379
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Wed Jun 16 16:47:24 2021 +0200

    chore(e2e): Remove obsolete operator upgrade test methods
---
 e2e/support/test_support.go | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index e8385e1..e12f6b9 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -871,35 +871,6 @@ func OperatorPod(ns string) func() *corev1.Pod {
        }
 }
 
-func OperatorTryPodForceKill(ns string, timeSeconds int) {
-       pod := OperatorPod(ns)()
-       if pod != nil {
-               if err := TestClient().Delete(TestContext, pod, 
ctrl.GracePeriodSeconds(timeSeconds)); err != nil {
-                       log.Error(err, "cannot forcefully kill the pod")
-               }
-       }
-}
-
-func ScaleOperator(ns string, replicas int32) func() error {
-       return func() error {
-               operator, err := 
TestClient().AppsV1().Deployments(ns).Get(TestContext, "camel-k-operator", 
metav1.GetOptions{})
-               if err != nil {
-                       return err
-               }
-               operator.Spec.Replicas = &replicas
-               _, err = 
TestClient().AppsV1().Deployments(ns).Update(TestContext, operator, 
metav1.UpdateOptions{})
-               if err != nil {
-                       return err
-               }
-
-               if replicas == 0 {
-                       // speedup scale down by killing the pod
-                       OperatorTryPodForceKill(ns, 10)
-               }
-               return nil
-       }
-}
-
 func Role(ns string) func() *rbacv1.Role {
        return func() *rbacv1.Role {
                lst := rbacv1.RoleList{

Reply via email to