diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-17 23:06:43 -0500 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2021-02-19 16:11:41 -0500 |
commit | 05eb06f5686be1a14f33cdc0c23785d6da0feccb (patch) | |
tree | d432293144587d760c965082bea389aea24c9d74 /test/utils | |
parent | 612ba6aa828d3c19b43f8420d99e0f1416f15cbf (diff) | |
download | podman-05eb06f5686be1a14f33cdc0c23785d6da0feccb.tar.gz podman-05eb06f5686be1a14f33cdc0c23785d6da0feccb.tar.bz2 podman-05eb06f5686be1a14f33cdc0c23785d6da0feccb.zip |
Turn on journald and k8s file logging tests
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'test/utils')
-rw-r--r-- | test/utils/utils.go | 10 |
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) + } +} |