mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-29 09:17:38 +00:00
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>
29 lines
644 B
Go
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
|
|
}
|