From 3d88f614f7ffb24417af6ce4776e96887f3c772c Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Wed, 15 Nov 2023 15:58:11 -0500 Subject: [PATCH] [CI:DOCS] Machine test timeout env var Introduce MACHINE_TEST_TIMEOUT, which sets the timeout for machine tests, in seconds. Signed-off-by: Ashley Cui --- pkg/machine/e2e/config_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/machine/e2e/config_test.go b/pkg/machine/e2e/config_test.go index a77c22652e..60e9187a5a 100644 --- a/pkg/machine/e2e/config_test.go +++ b/pkg/machine/e2e/config_test.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "path/filepath" + "strconv" "strings" "time" @@ -100,6 +101,13 @@ func newMB() (*machineTestBuilder, error) { if os.Getenv("PODMAN_BINARY") != "" { mb.podmanBinary = os.Getenv("PODMAN_BINARY") } + if os.Getenv("MACHINE_TEST_TIMEOUT") != "" { + seconds, err := strconv.Atoi(os.Getenv("MACHINE_TEST_TIMEOUT")) + if err != nil { + return nil, err + } + mb.timeout = time.Duration(seconds) * time.Second + } return &mb, nil }