make the eventually timeout of e2e test configurable (#197)

Signed-off-by: Yang Le <yangle@redhat.com>
This commit is contained in:
Yang Le
2023-04-10 10:15:16 -04:00
committed by GitHub
parent a9d4e1f020
commit 1e4671dcc5
2 changed files with 6 additions and 4 deletions
+5 -2
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"os"
"testing"
"time"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
@@ -36,6 +37,7 @@ var (
workImage string
managedKubeconfig string
webhookDeploymentName string
eventuallyTimeout time.Duration
hubNamespace = "open-cluster-management-hub"
)
@@ -43,11 +45,12 @@ var (
func init() {
flag.StringVar(&clusterName, "cluster-name", "", "The name of the managed cluster on which the testing will be run")
flag.StringVar(&hubKubeconfig, "hub-kubeconfig", "", "The kubeconfig of the hub cluster")
flag.BoolVar(&nilExecutorValidating, "nil-executor-validating", false, "Whether validate the nil executor or not")
flag.BoolVar(&deployWorkAgent, "deploy-agent", false, "Whether deploy the work agent on the managed cluster or not")
flag.BoolVar(&nilExecutorValidating, "nil-executor-validating", false, "Whether validate the nil executor or not (default false)")
flag.BoolVar(&deployWorkAgent, "deploy-agent", false, "Whether deploy the work agent on the managed cluster or not (default false)")
flag.StringVar(&workImage, "work-image", "", "The image used to deploy the work agent")
flag.StringVar(&managedKubeconfig, "managed-kubeconfig", "", "The kubeconfig of the managed cluster")
flag.StringVar(&webhookDeploymentName, "webhook-deployment-name", "", "The deployment name of the work validating webhook on the hub cluster. If specified, the webhook status will be checked before run the test cases")
flag.DurationVar(&eventuallyTimeout, "eventually-timeout", 60*time.Second, "The timeout of Gomega's Eventually (default 60 seconds)")
}
var (
+1 -2
View File
@@ -28,8 +28,7 @@ import (
)
const (
eventuallyTimeout = 60 // seconds
eventuallyInterval = 1 // seconds
eventuallyInterval = 1 // seconds
guestBookCRDJson = `{
"apiVersion": "apiextensions.k8s.io/v1",