Merge pull request #918 from SirPhuttel/rawhide_testing

Two minor testsuite fixes
This commit is contained in:
Casey Callendrello 2023-07-21 12:22:46 +02:00 committed by GitHub
commit fb8ca5d31e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -86,7 +86,8 @@ func spawnSessionDbus(wg *sync.WaitGroup) (string, *exec.Cmd) {
bytes, err := bufio.NewReader(stdout).ReadString('\n') bytes, err := bufio.NewReader(stdout).ReadString('\n')
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
busAddr := strings.TrimSpace(bytes) busAddr := strings.TrimSpace(bytes)
Expect(strings.HasPrefix(busAddr, "unix:abstract")).To(BeTrue()) Expect(strings.HasPrefix(busAddr, "unix:abstract") ||
strings.HasPrefix(busAddr, "unix:path")).To(BeTrue())
var startWg sync.WaitGroup var startWg sync.WaitGroup
wg.Add(1) wg.Add(1)

View File

@ -39,5 +39,5 @@ for t in ${PKG}; do
done done
# Run the pkg/ns tests as non root user # Run the pkg/ns tests as non root user
mkdir /tmp/cni-rootless mkdir -p /tmp/cni-rootless
(export XDG_RUNTIME_DIR=/tmp/cni-rootless; cd pkg/ns/; unshare -rmn go test) (export XDG_RUNTIME_DIR=/tmp/cni-rootless; cd pkg/ns/; unshare -rmn go test)