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) CleanUpAllResources() error
- func (h *Harness) CleanUpResources(resourceType string) (string, error)
- func (h *Harness) Cleanup(printConsole bool)
- func (h *Harness) EnrollAndWaitForOnlineStatus() (string, *v1alpha1.Device)
- func (h *Harness) GetCertificateSigningRequestByYaml(csrYaml string) v1alpha1.CertificateSigningRequest
- func (h *Harness) GetCurrentDeviceRenderedVersion(deviceId string) (deviceRenderedVersionInt int, err error)
- func (h *Harness) GetDeviceByYaml(deviceYaml string) v1alpha1.Device
- func (h *Harness) GetDeviceWithStatusSummary(enrollmentID string) v1alpha1.DeviceSummaryStatusType
- func (h *Harness) GetDeviceWithStatusSystem(enrollmentID string) *apiclient.ReadDeviceResponse
- func (h *Harness) GetDeviceWithUpdateStatus(enrollmentID string) v1alpha1.DeviceUpdatedStatusType
- func (h *Harness) GetEnrollmentIDFromConsole() string
- func (h *Harness) GetEnrollmentRequestByYaml(erYaml string) v1alpha1.EnrollmentRequest
- func (h *Harness) GetFleetByYaml(fleetYaml string) v1alpha1.Fleet
- func (h *Harness) GetRepositoryByYaml(repoYaml string) v1alpha1.Repository
- func (h *Harness) GetResourceSyncByYaml(rSyncYaml string) v1alpha1.ResourceSync
- func (h *Harness) PrepareNextDeviceVersion(deviceId string) (int, error)
- func (h *Harness) RegistryEndpoint() string
- func (h *Harness) ReplaceVariableInString(s string, old string, new string) string
- func (h *Harness) RunInteractiveCLI(args ...string) (io.WriteCloser, io.ReadCloser, error)
- func (h *Harness) SH(command string, args ...string) (string, error)
- func (h *Harness) SHWithStdin(stdin, command string, args ...string) (string, error)
- func (h *Harness) StartVMAndEnroll() string
- func (h *Harness) UpdateDeviceWithRetries(deviceId string, updateFunction func(*v1alpha1.Device))
- func (h *Harness) WaitForBootstrapAndUpdateToVersion(deviceId string, version string) (*v1alpha1.Device, string)
- func (h *Harness) WaitForDeviceConfigUpdate(deviceId string, configs []v1alpha1.ConfigProviderSpec) error
- func (h *Harness) WaitForDeviceContents(deviceId string, description string, condition func(*v1alpha1.Device) bool, ...)
- func (h *Harness) WaitForDeviceNewRenderedVersion(deviceId string, newRenderedVersionInt int) (err error)
- func (h *Harness) WaitForEnrollmentRequest(id string) *v1alpha1.EnrollmentRequest
Constants ¶
View Source
const LONGTIMEOUT = "2m"
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) CleanUpAllResources ¶ added in v0.4.0
func (*Harness) CleanUpResources ¶ added in v0.4.0
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) EnrollAndWaitForOnlineStatus ¶ added in v0.4.0
func (*Harness) GetCertificateSigningRequestByYaml ¶ added in v0.4.0
func (h *Harness) GetCertificateSigningRequestByYaml(csrYaml string) v1alpha1.CertificateSigningRequest
Wrapper function for CertificateSigningRequest
func (*Harness) GetCurrentDeviceRenderedVersion ¶ added in v0.4.0
func (*Harness) GetDeviceByYaml ¶ added in v0.4.0
Wrapper function for Device
func (*Harness) GetDeviceWithStatusSummary ¶ added in v0.4.0
func (h *Harness) GetDeviceWithStatusSummary(enrollmentID string) v1alpha1.DeviceSummaryStatusType
func (*Harness) GetDeviceWithStatusSystem ¶
func (h *Harness) GetDeviceWithStatusSystem(enrollmentID string) *apiclient.ReadDeviceResponse
func (*Harness) GetDeviceWithUpdateStatus ¶ added in v0.4.0
func (h *Harness) GetDeviceWithUpdateStatus(enrollmentID string) v1alpha1.DeviceUpdatedStatusType
func (*Harness) GetEnrollmentIDFromConsole ¶
func (*Harness) GetEnrollmentRequestByYaml ¶ added in v0.4.0
func (h *Harness) GetEnrollmentRequestByYaml(erYaml string) v1alpha1.EnrollmentRequest
Wrapper function for EnrollmentRequest
func (*Harness) GetFleetByYaml ¶ added in v0.4.0
Wrapper function for Fleet
func (*Harness) GetRepositoryByYaml ¶ added in v0.4.0
func (h *Harness) GetRepositoryByYaml(repoYaml string) v1alpha1.Repository
Wrapper function for Repository
func (*Harness) GetResourceSyncByYaml ¶ added in v0.4.0
func (h *Harness) GetResourceSyncByYaml(rSyncYaml string) v1alpha1.ResourceSync
Wrapper function for ResourceSync
func (*Harness) PrepareNextDeviceVersion ¶ added in v0.4.0
func (*Harness) RegistryEndpoint ¶ added in v0.4.0
func (*Harness) ReplaceVariableInString ¶ added in v0.4.0
func (*Harness) RunInteractiveCLI ¶
func (h *Harness) RunInteractiveCLI(args ...string) (io.WriteCloser, io.ReadCloser, error)
func (*Harness) SHWithStdin ¶ added in v0.3.0
func (*Harness) StartVMAndEnroll ¶
func (*Harness) UpdateDeviceWithRetries ¶ added in v0.3.0
func (*Harness) WaitForBootstrapAndUpdateToVersion ¶ added in v0.4.0
func (*Harness) WaitForDeviceConfigUpdate ¶ added in v0.4.0
func (h *Harness) WaitForDeviceConfigUpdate(deviceId string, configs []v1alpha1.ConfigProviderSpec) error
func (*Harness) WaitForDeviceContents ¶ added in v0.3.0
func (*Harness) WaitForDeviceNewRenderedVersion ¶ added in v0.4.0
func (*Harness) WaitForEnrollmentRequest ¶
func (h *Harness) WaitForEnrollmentRequest(id string) *v1alpha1.EnrollmentRequest
Click to show internal directories.
Click to hide internal directories.