spiegel_podman/pkg/machine/e2e/config_unix_test.go
Mario Loriedo 48f21de496 Fixing machine e2e gvproxy test
The lookup for the gvproxy process was broken on Windows:
- We looked for gvproxy, not gvproxy.exe, and `tasklist` was always
failing
- But `pgrep` wasn't failing because we looked for the wrong `tasklist`
error message (the correct error message on my laptop is "INFO: No tasks
are running which match the specified criteria.")
- WSL uses win-sshproxy.exe, not gvproxy.exe

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-07-15 11:42:11 +02:00

29 lines
644 B
Go

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
package e2e_test
import (
"os"
"os/exec"
)
var (
fakeImagePath = os.DevNull
gvproxy = "gvproxy"
)
func pgrep(n string) (string, error) {
out, err := exec.Command("pgrep", n).Output()
return string(out), err
}
func initPlatform() {}
func cleanupPlatform() {}
// withFakeImage should be used in tests where the machine is
// initialized (or not) but never started. It is intended
// to speed up CI by not processing our large machine files.
func (i *initMachine) withFakeImage(_ *machineTestBuilder) *initMachine {
i.image = fakeImagePath
return i
}