mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #20696 from ashley-cui/ci
[CI:DOCS] Machine test timeout env var
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user