mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
fake images: windows hyperv
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>
This commit is contained in:
@@ -3,10 +3,24 @@
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user