mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
Update machine init/set tests
Init/Set with --rootful Init/Set with --user-mode-networking Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -201,3 +202,16 @@ func (matcher *ValidJSONMatcher) FailureMessage(actual interface{}) (message str
|
||||
func (matcher *ValidJSONMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
return format.Message(actual, "to _not_ be valid JSON")
|
||||
}
|
||||
|
||||
func checkReason(reason string) {
|
||||
if len(reason) < 5 {
|
||||
panic("Test must specify a reason to skip")
|
||||
}
|
||||
}
|
||||
|
||||
func SkipIfNotWindows(reason string) {
|
||||
checkReason(reason)
|
||||
if runtime.GOOS != "windows" {
|
||||
Skip("[not windows]: " + reason)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user