e2e

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseImage = "quay.io/centos-bootc/centos-bootc-dev:stream9"
View Source
const TestImageOne = "quay.io/ckyrouac/podman-bootc-test:one"
View Source
const TestImageTwo = "quay.io/ckyrouac/podman-bootc-test:two"

Variables

View Source
var BaseImage = GetBaseImage()

Functions

func Cleanup

func Cleanup() (err error)

func GetBaseImage

func GetBaseImage() string

func GetVMIdFromContainerImage

func GetVMIdFromContainerImage(image string) (vmId string, err error)

func ListCacheDirs

func ListCacheDirs() (vmDirs []string, err error)

func PodmanBootcBinary

func PodmanBootcBinary() string

func ProjectRoot

func ProjectRoot() string

func RunCmd

func RunCmd(cmd string, args ...string) (stdout string, stderr string, err error)

func RunPodman

func RunPodman(args ...string) (stdout string, stderr string, err error)

func RunPodmanBootc

func RunPodmanBootc(args ...string) (stdout string, stderr string, err error)

func VMExists

func VMExists(id string) (exits bool, err error)

func VMIsRunning

func VMIsRunning(id string) (exits bool, err error)

Types

type ListEntry

type ListEntry struct {
	Id      string
	Repo    string
	Running string
}

func ParseListOutput

func ParseListOutput(stdout string) (listOutput []ListEntry)

ParseListOutput parses the output of the podman bootc list command for easier comparison

type TestVM

type TestVM struct {
	StdIn    io.WriteCloser
	StdOut   []string
	IsBooted bool
	Id       string
}

func BootVM

func BootVM(image string) (vm *TestVM, err error)

func (*TestVM) GetId

func (w *TestVM) GetId() string

func (*TestVM) SendCommand

func (w *TestVM) SendCommand(cmd string, output string) (err error)

SendCommand sends a command to the VM's stdin and waits for the output

func (*TestVM) SetId

func (w *TestVM) SetId(id string)

func (*TestVM) WaitForBoot

func (w *TestVM) WaitForBoot() (err error)

func (*TestVM) Write

func (w *TestVM) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL