mirror of https://github.com/containers/podman.git
				
				
				
			[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 <acui@redhat.com>
This commit is contained in:
		
							parent
							
								
									fcf4f33277
								
							
						
					
					
						commit
						3d88f614f7
					
				|  | @ -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 | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue