diff options
Diffstat (limited to 'test/e2e/common_test.go')
-rw-r--r-- | test/e2e/common_test.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 2e48e1763..6b97c4162 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -645,9 +645,13 @@ func isRootless() bool { return os.Geteuid() != 0 } +func isCgroupsV1() bool { + return !CGROUPSV2 +} + func SkipIfCgroupV1(reason string) { checkReason(reason) - if !CGROUPSV2 { + if isCgroupsV1() { Skip(reason) } } @@ -841,3 +845,18 @@ func (p *PodmanTestIntegration) buildImage(dockerfile, imageName string, layers output := session.OutputToStringArray() return output[len(output)-1] } + +func writeYaml(content string, fileName string) error { + f, err := os.Create(fileName) + if err != nil { + return err + } + defer f.Close() + + _, err = f.WriteString(content) + if err != nil { + return err + } + + return nil +} |