ci: rm "skip on CentOS 7" kludges

We no longer test on CentOS 7.

Remove the internal/testutil package as it has no other uses.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2024-11-04 18:05:41 -08:00
parent ef3999def9
commit 9cb59b4659
3 changed files with 0 additions and 39 deletions
-30
View File
@@ -1,30 +0,0 @@
package testutil
import (
"os/exec"
"strconv"
"sync"
"testing"
)
var (
centosVer string
centosVerOnce sync.Once
)
func centosVersion() string {
centosVerOnce.Do(func() {
ver, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
centosVer = string(ver)
})
return centosVer
}
func SkipOnCentOS(t *testing.T, reason string, versions ...int) {
t.Helper()
for _, v := range versions {
if vstr := strconv.Itoa(v); centosVersion() == vstr {
t.Skip(reason + " on CentOS " + vstr)
}
}
}