Add timeout option to configtest (#400)

This commit is contained in:
Kota Kanbe
2017-03-23 20:52:25 +09:00
committed by GitHub
parent af5a1204bc
commit 7131270cad
4 changed files with 15 additions and 6 deletions

View File

@@ -342,8 +342,7 @@ func detectContainerOSesOnServer(containerHost osTypeInterface) (oses []osTypeIn
}
// CheckDependencies checks dependencies are installed on target servers.
func CheckDependencies() {
timeoutSec := 5 * 60
func CheckDependencies(timeoutSec int) {
parallelExec(func(o osTypeInterface) error {
return o.checkDependencies()
}, timeoutSec)
@@ -351,8 +350,7 @@ func CheckDependencies() {
}
// CheckIfSudoNoPasswd checks whether vuls can sudo with nopassword via SSH
func CheckIfSudoNoPasswd() {
timeoutSec := 5 * 60
func CheckIfSudoNoPasswd(timeoutSec int) {
parallelExec(func(o osTypeInterface) error {
return o.checkIfSudoNoPasswd()
}, timeoutSec)