mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
Merge pull request #10237 from edsantiago/ci_rootless_add_ubuntu
CI: run rootless tests under ubuntu
This commit is contained in:
@ -539,7 +539,7 @@ rootless_integration_test_task:
|
|||||||
skip: *branches_and_tags
|
skip: *branches_and_tags
|
||||||
depends_on:
|
depends_on:
|
||||||
- unit_test
|
- unit_test
|
||||||
matrix: *fedora_vm_axis
|
matrix: *platform_axis
|
||||||
gce_instance: *standardvm
|
gce_instance: *standardvm
|
||||||
timeout_in: 90m
|
timeout_in: 90m
|
||||||
env:
|
env:
|
||||||
@ -614,7 +614,7 @@ rootless_system_test_task:
|
|||||||
only_if: *not_docs
|
only_if: *not_docs
|
||||||
depends_on:
|
depends_on:
|
||||||
- rootless_integration_test
|
- rootless_integration_test
|
||||||
matrix: *fedora_vm_axis
|
matrix: *platform_axis
|
||||||
gce_instance: *standardvm
|
gce_instance: *standardvm
|
||||||
env:
|
env:
|
||||||
TEST_FLAVOR: sys
|
TEST_FLAVOR: sys
|
||||||
|
@ -605,13 +605,6 @@ func SkipIfRootlessCgroupsV1(reason string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func SkipIfUnprivilegedCPULimits() {
|
|
||||||
info := GetHostDistributionInfo()
|
|
||||||
if isRootless() && info.Distribution == "fedora" {
|
|
||||||
ginkgo.Skip("Rootless Fedora doesn't have permission to set CPU limits")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func SkipIfRootless(reason string) {
|
func SkipIfRootless(reason string) {
|
||||||
checkReason(reason)
|
checkReason(reason)
|
||||||
if os.Geteuid() != 0 {
|
if os.Geteuid() != 0 {
|
||||||
|
@ -1999,8 +1999,7 @@ VOLUME %s`, ALPINE, hostPathDir+"/")
|
|||||||
|
|
||||||
It("podman play kube allows setting resource limits", func() {
|
It("podman play kube allows setting resource limits", func() {
|
||||||
SkipIfContainerized("Resource limits require a running systemd")
|
SkipIfContainerized("Resource limits require a running systemd")
|
||||||
SkipIfRootlessCgroupsV1("Limits require root or cgroups v2")
|
SkipIfRootless("CPU limits require root")
|
||||||
SkipIfUnprivilegedCPULimits()
|
|
||||||
podmanTest.CgroupManager = "systemd"
|
podmanTest.CgroupManager = "systemd"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -10,16 +10,18 @@ function setup() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman --context emits reasonable output" {
|
#### DO NOT ADD ANY TESTS HERE! ADD NEW TESTS AT BOTTOM!
|
||||||
run_podman 125 --context=swarm version
|
|
||||||
is "$output" "Error: Podman does not support swarm, the only --context value allowed is \"default\"" "--context=default or fail"
|
|
||||||
|
|
||||||
run_podman --context=default version
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "podman version emits reasonable output" {
|
@test "podman version emits reasonable output" {
|
||||||
run_podman version
|
run_podman version
|
||||||
|
|
||||||
|
# FIXME FIXME FIXME: #10248: nasty message on Ubuntu cgroups v1, rootless
|
||||||
|
if [[ "$output" =~ "overlay test mount with multiple lowers failed" ]]; then
|
||||||
|
if is_rootless; then
|
||||||
|
lines=("${lines[@]:1}")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# First line of podman-remote is "Client:<blank>".
|
# First line of podman-remote is "Client:<blank>".
|
||||||
# Just delete it (i.e. remove the first entry from the 'lines' array)
|
# Just delete it (i.e. remove the first entry from the 'lines' array)
|
||||||
if is_remote; then
|
if is_remote; then
|
||||||
@ -41,6 +43,17 @@ function setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@test "podman --context emits reasonable output" {
|
||||||
|
# All we care about here is that the command passes
|
||||||
|
run_podman --context=default version
|
||||||
|
|
||||||
|
# This one must fail
|
||||||
|
run_podman 125 --context=swarm version
|
||||||
|
is "$output" \
|
||||||
|
"Error: Podman does not support swarm, the only --context value allowed is \"default\"" \
|
||||||
|
"--context=default or fail"
|
||||||
|
}
|
||||||
|
|
||||||
@test "podman can pull an image" {
|
@test "podman can pull an image" {
|
||||||
run_podman pull $IMAGE
|
run_podman pull $IMAGE
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user