Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
test/components/util: add default retry interval and timeout
Browse files Browse the repository at this point in the history
So other test packages don't have to specify their own explicitly, but
they can just re-use default ones, if they suite the test case.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian committed May 25, 2020
1 parent 3646b96 commit a65ff2c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/components/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ import (
"k8s.io/client-go/transport/spdy"
)

const (
// RetryInterval is the default retry interval for tests using retry strategy, so they
// don't have to specify their own local intervals.
RetryInterval = time.Second * 5

// Timeout is the default timeout for tests using retry strategy, so they
// don't have to specify their own local timeouts.
Timeout = time.Minute * 5
)

func KubeconfigPath(t *testing.T) string {
kubeconfig := os.ExpandEnv(os.Getenv("KUBECONFIG"))

Expand Down

0 comments on commit a65ff2c

Please sign in to comment.