Skip to content

Commit

Permalink
Test fixes for debian
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Santiago <santiago@redhat.com>
  • Loading branch information
edsantiago committed Nov 16, 2023
1 parent 23ead49 commit d2a4ec8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1545,14 +1545,18 @@ VOLUME %s`, ALPINE, volPath, volPath)
container.WaitWithDefaultTimeout()
Expect(container).Should(Exit(0))
checkLines(container.OutputToStringArray())
Expect(container.ErrorToString()).To(ContainSubstring("Running scope as unit: "))
Expect(container.ErrorToString()).To(Or(
ContainSubstring("Running scope as unit: "), // systemd < 255
ContainSubstring("Running as unit: "))) // systemd >= 255

// check that --cgroups=split is honored also when a container runs in a pod
container = podmanTest.PodmanSystemdScope([]string{"run", "--rm", "--pod", "new:split-test-pod", "--cgroups=split", ALPINE, "cat", "/proc/self/cgroup"})
container.WaitWithDefaultTimeout()
Expect(container).Should(Exit(0))
checkLines(container.OutputToStringArray())
Expect(container.ErrorToString()).To(ContainSubstring("Running scope as unit: "))
Expect(container.ErrorToString()).To(Or(
ContainSubstring("Running scope as unit: "), // systemd < 255
ContainSubstring("Running as unit: "))) // systemd >= 255
})

It("podman run with cgroups=disabled runs without cgroups", func() {
Expand Down
5 changes: 5 additions & 0 deletions test/system/005-info.bats
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ host.slirp4netns.executable | $expr_path
@test "CONTAINERS_CONF_OVERRIDE" {
skip_if_remote "remote does not support CONTAINERS_CONF*"

# Need to include runtime because it's runc in debian CI,
# and crun 1.11.1 barfs with "read from sync socket"
containersConf=$PODMAN_TMPDIR/containers.conf
cat >$containersConf <<EOF
[engine]
runtime="$(podman_runtime)"
[containers]
env = [ "CONF1=conf1" ]
Expand Down

0 comments on commit d2a4ec8

Please sign in to comment.