mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
this pr is a follow on to #27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
27 lines
627 B
Go
27 lines
627 B
Go
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
|
|
|
|
package e2e_test
|
|
|
|
import (
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
var fakeImagePath string = os.DevNull
|
|
|
|
func pgrep(_ string) (string, error) {
|
|
out, err := exec.Command("pgrep", "gvproxy").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
|
|
}
|