summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-21 05:03:46 -0500
committerGitHub <noreply@github.com>2021-02-21 05:03:46 -0500
commit7b52654649f4b9140b6ce2956afa9ad836720c6a (patch)
tree9034521baed62ab46ad743d3b28be8982887bb09 /test/utils/utils.go
parent4aaaa6c1df3a1c90a930b97552bcc970d7d99dd4 (diff)
parent05eb06f5686be1a14f33cdc0c23785d6da0feccb (diff)
downloadpodman-7b52654649f4b9140b6ce2956afa9ad836720c6a.tar.gz
podman-7b52654649f4b9140b6ce2956afa9ad836720c6a.tar.bz2
podman-7b52654649f4b9140b6ce2956afa9ad836720c6a.zip
Merge pull request #9417 from ashley-cui/journald
Fix journald logs
Diffstat (limited to 'test/utils/utils.go')
-rw-r--r--test/utils/utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 6790f31cd..80af7fb7c 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -482,3 +482,13 @@ func RandomString(n int) string {
}
return string(b)
}
+
+//SkipIfInContainer skips a test if the test is run inside a container
+func SkipIfInContainer(reason string) {
+ if len(reason) < 5 {
+ panic("SkipIfInContainer must specify a reason to skip")
+ }
+ if os.Getenv("TEST_ENVIRON") == "container" {
+ Skip("[container]: " + reason)
+ }
+}