fix(podman)

error message changed in v5

closes #5651
This commit is contained in:
Jacob Heider 2024-03-19 14:30:59 -04:00 committed by Jacob Heider
parent 0031f37841
commit 0cb59ffa06

View file

@ -18,6 +18,9 @@ dependencies:
qemu.org: '*' qemu.org: '*'
github.com/containers/gvisor-tap-vsock: '*' github.com/containers/gvisor-tap-vsock: '*'
companions:
openssh.com: '*' # ssh-keygen
build: build:
dependencies: dependencies:
go.dev: ^1.18 go.dev: ^1.18
@ -28,8 +31,7 @@ build:
- run: | - run: |
sed -i.bak -f $PROP config_{darwin,linux}.go sed -i.bak -f $PROP config_{darwin,linux}.go
rm config_{darwin,linux}.go.bak rm config_{darwin,linux}.go.bak
working-directory: working-directory: vendor/github.com/containers/common/pkg/config
vendor/github.com/containers/common/pkg/config
prop: |- prop: |-
s_\(^var defaultHelperBinariesDir.*\)_\ s_\(^var defaultHelperBinariesDir.*\)_\
\1\n "$BINDIR/../../../github.com/containers/gvisor-tap-vsock/v{{deps.github.com/containers/gvisor-tap-vsock.version.major}}/bin",_ \1\n "$BINDIR/../../../github.com/containers/gvisor-tap-vsock/v{{deps.github.com/containers/gvisor-tap-vsock.version.major}}/bin",_
@ -56,8 +58,12 @@ test:
script: script:
- podman-remote -v | grep "podman-remote version {{ version }}" - podman-remote -v | grep "podman-remote version {{ version }}"
- (podman info 2>&1 || true) | grep "Cannot connect to Podman." - (podman info 2>&1 || true) | grep "Cannot connect to Podman."
# won't run as root # won't run as root
- | - |
if test $(id -g) != 0; then if test $(id -g) = 0; then
(podman machine init --image-path fake-testimage fake-testvm 2>&1 || true) | grep 'Error: open fake-testimage: no such file or directory' exit 0
fi fi
# error message changed in v5
- "(podman machine init --image-path fake-testimage fake-testvm 2>&1 || true) | grep -E 'Error: (open|stat) fake-testimage: no such file or directory'"