ci: skip TestPodSkipDevicesUpdate on CentOS 7

This test is as flaky as TestSkipDevices*, let's also t skip it on CentOS 7.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2023-10-06 13:09:55 -07:00
parent 033cc7aedb
commit fa8f38171c
+11 -5
View File
@@ -26,6 +26,7 @@ func TestPodSkipDevicesUpdate(t *testing.T) {
if os.Geteuid() != 0 {
t.Skip("Test requires root.")
}
skipOnCentOS7(t)
podName := "system-runc_test_pod" + t.Name() + ".slice"
podConfig := &configs.Cgroup{
@@ -116,6 +117,15 @@ func TestPodSkipDevicesUpdate(t *testing.T) {
}
}
func skipOnCentOS7(t *testing.T) {
t.Helper()
// https://github.com/opencontainers/runc/issues/3743
centosVer, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
if string(centosVer) == "7" {
t.Skip("Flaky on CentOS 7")
}
}
func testSkipDevices(t *testing.T, skipDevices bool, expected []string) {
if !systemd.IsRunningSystemd() {
t.Skip("Test requires systemd.")
@@ -123,11 +133,7 @@ func testSkipDevices(t *testing.T, skipDevices bool, expected []string) {
if os.Geteuid() != 0 {
t.Skip("Test requires root.")
}
// https://github.com/opencontainers/runc/issues/3743
centosVer, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
if string(centosVer) == "7" {
t.Skip("Flaky on CentOS 7")
}
skipOnCentOS7(t)
podConfig := &configs.Cgroup{
Parent: "system.slice",