Documentation ¶
Index ¶
- Constants
- func CheckCRCExecutableState(state string) error
- func CheckCRCStatus(state string) error
- func DeleteCRC() error
- func Exec(cmd *exec.Cmd, timeout <-chan time.Time) (string, string, error)
- func RunPodmanExpectFail(args ...string) (string, error)
- func RunPodmanExpectSuccess(args ...string) (string, error)
- func SetConfigPropertyToValueSucceedsOrFails(property string, value string, expected string) error
- func UnsetConfigPropertySucceedsOrFails(property string, expected string) error
- func WaitForClusterInState(state string) error
- type CodeExitError
- type Command
- type ExitError
- type PodmanBuilder
- func (b PodmanBuilder) Exec() (string, error)
- func (b PodmanBuilder) ExecOrDie() (string, error)
- func (b PodmanBuilder) ExecOrDieWithLogs() (string, string, error)
- func (b PodmanBuilder) ExecWithFullOutput() (string, string, error)
- func (b PodmanBuilder) WithStdinData(data string) *PodmanBuilder
- func (b PodmanBuilder) WithStdinReader(reader io.Reader) *PodmanBuilder
- func (b *PodmanBuilder) WithTimeout(t <-chan time.Time) *PodmanBuilder
Constants ¶
const ( CRCExecutableInstalled = "installed" CRCExecutableNotInstalled = "notInstalled" )
Variables ¶
This section is empty.
Functions ¶
func CheckCRCExecutableState ¶
func CheckCRCStatus ¶
func RunPodmanExpectFail ¶
RunPodmanExpectFail is a convenience wrapper over PodmanBuilder if err != nil: return stderr, nil if err == nil: return stdout, err
func RunPodmanExpectSuccess ¶
RunPodmanExpectSuccess is a convenience wrapper over podman-remote
func WaitForClusterInState ¶
Types ¶
type CodeExitError ¶
CodeExitError is an implementation of ExitError consisting of an error object and an exit code (the upper bits of os.exec.ExitStatus).
func (CodeExitError) Error ¶
func (e CodeExitError) Error() string
func (CodeExitError) ExitStatus ¶
func (e CodeExitError) ExitStatus() int
func (CodeExitError) Exited ¶
func (e CodeExitError) Exited() bool
func (CodeExitError) String ¶
func (e CodeExitError) String() string
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (Command) ExecuteSingleWithExpectedExit ¶
func (Command) ExecuteWithExpectedExit ¶
func (Command) WithDisableNTP ¶
func (Command) WithUpdateCheck ¶
type ExitError ¶
ExitError is an interface that presents an API similar to os.ProcessState, which is what ExitError from os/exec is. This is designed to make testing a bit easier and probably loses some of the cross-platform properties of the underlying library.
type PodmanBuilder ¶
type PodmanBuilder struct {
// contains filtered or unexported fields
}
PodmanBuilder is used to build, customize, and execute a podman-remote command.
func NewPodmanCommand ¶
func NewPodmanCommand(args ...string) *PodmanBuilder
NewPodmanCommand returns a PodmanBuilder for running CRC.
func (PodmanBuilder) ExecOrDie ¶
func (b PodmanBuilder) ExecOrDie() (string, error)
ExecOrDie runs the executable or dies if error occurs.
func (PodmanBuilder) ExecOrDieWithLogs ¶
func (b PodmanBuilder) ExecOrDieWithLogs() (string, string, error)
ExecOrDieWithLogs runs the executable or dies if error occurs.
func (PodmanBuilder) ExecWithFullOutput ¶
func (b PodmanBuilder) ExecWithFullOutput() (string, string, error)
ExecWithFullOutput runs the executable and returns the stdout and stderr.
func (PodmanBuilder) WithStdinData ¶
func (b PodmanBuilder) WithStdinData(data string) *PodmanBuilder
WithStdinData sets the given data to stdin and returns itself.
func (PodmanBuilder) WithStdinReader ¶
func (b PodmanBuilder) WithStdinReader(reader io.Reader) *PodmanBuilder
WithStdinReader sets the given reader and returns itself.
func (*PodmanBuilder) WithTimeout ¶
func (b *PodmanBuilder) WithTimeout(t <-chan time.Time) *PodmanBuilder
WithTimeout sets the given timeout and returns itself.