Documentation
¶
Index ¶
- Constants
- type Harness
- func (h *Harness) ApiEndpoint() string
- func (h *Harness) ApproveEnrollment(id string, approval *v1alpha1.EnrollmentRequestApproval)
- func (h *Harness) CLI(args ...string) (string, error)
- func (h *Harness) CLIWithStdin(stdin string, args ...string) (string, error)
- func (h *Harness) Cleanup(printConsole bool)
- func (h *Harness) GetDeviceWithStatusSystem(enrollmentID string) *apiclient.ReadDeviceResponse
- func (h *Harness) GetEnrollmentIDFromConsole() string
- func (h *Harness) RunInteractiveCLI(args ...string) (io.WriteCloser, io.ReadCloser, error)
- func (h *Harness) StartVMAndEnroll() string
- func (h *Harness) WaitForEnrollmentRequest(id string) *v1alpha1.EnrollmentRequest
Constants ¶
View Source
const POLLING = "250ms"
View Source
const TIMEOUT = "60s"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Harness ¶
type Harness struct {
VM vm.TestVMInterface
Client *apiclient.ClientWithResponses
Context context.Context
// contains filtered or unexported fields
}
func NewTestHarness ¶
func NewTestHarness() *Harness
func (*Harness) ApiEndpoint ¶
func (*Harness) ApproveEnrollment ¶
func (h *Harness) ApproveEnrollment(id string, approval *v1alpha1.EnrollmentRequestApproval)
func (*Harness) CLIWithStdin ¶
func (*Harness) Cleanup ¶
Harness cleanup, this will delete the VM and cancel the context if something failed we try to gather logs, console logs are optional and can be enabled by setting printConsole to true
func (*Harness) GetDeviceWithStatusSystem ¶
func (h *Harness) GetDeviceWithStatusSystem(enrollmentID string) *apiclient.ReadDeviceResponse
func (*Harness) GetEnrollmentIDFromConsole ¶
func (*Harness) RunInteractiveCLI ¶
func (h *Harness) RunInteractiveCLI(args ...string) (io.WriteCloser, io.ReadCloser, error)
func (*Harness) StartVMAndEnroll ¶
func (*Harness) WaitForEnrollmentRequest ¶
func (h *Harness) WaitForEnrollmentRequest(id string) *v1alpha1.EnrollmentRequest
Click to show internal directories.
Click to hide internal directories.