Documentation
¶
Index ¶
- type KubeVerifier
- type MockClient
- func (m *MockClient) CleanupJob(ctx context.Context, jobName string) error
- func (m *MockClient) CreateJob(ctx context.Context, job *batchv1.Job) (*batchv1.Job, error)
- func (m *MockClient) DeleteJob(ctx context.Context, jobName string) error
- func (m *MockClient) GetJobLogs(ctx context.Context, jobName string) (string, error)
- func (m *MockClient) GetNamespace() string
- func (m *MockClient) SetCreateJobError(err error)
- func (m *MockClient) SetGetJobLogsResult(logs string, err error)
- func (m *MockClient) SetNamespace(namespace string)
- func (m *MockClient) SetWaitForJobCompletionError(err error)
- func (m *MockClient) WaitForJobCompletion(ctx context.Context, jobName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeVerifier ¶
type KubeVerifier struct {
KubeClient kube.ClientInterface
Logger ocmlog.Logger
Output output.Output
}
func NewKubeVerifier ¶
func NewKubeVerifier(clientset kubernetes.Interface, debug bool) (*KubeVerifier, error)
NewKubeVerifier returns a KubeVerifier authenticated to a k8s cluster with the given clientset
func (*KubeVerifier) ValidateEgress ¶
func (k *KubeVerifier) ValidateEgress(vei verifier.ValidateEgressInput) *output.Output
func (*KubeVerifier) VerifyDns ¶
func (k *KubeVerifier) VerifyDns(vdi verifier.VerifyDnsInput) *output.Output
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a simple mock implementation for testing
func NewMockClient ¶
func NewMockClient() *MockClient
NewMockClient creates a new simple mock client
func (*MockClient) CleanupJob ¶
func (m *MockClient) CleanupJob(ctx context.Context, jobName string) error
func (*MockClient) DeleteJob ¶
func (m *MockClient) DeleteJob(ctx context.Context, jobName string) error
func (*MockClient) GetJobLogs ¶
GetJobLogs mocks getting job logs
func (*MockClient) GetNamespace ¶
func (m *MockClient) GetNamespace() string
GetNamespace returns the configured namespace
func (*MockClient) SetCreateJobError ¶
func (m *MockClient) SetCreateJobError(err error)
SetCreateJobError sets the error to return from CreateJob
func (*MockClient) SetGetJobLogsResult ¶
func (m *MockClient) SetGetJobLogsResult(logs string, err error)
SetGetJobLogsResult sets the result to return from GetJobLogs
func (*MockClient) SetNamespace ¶
func (m *MockClient) SetNamespace(namespace string)
SetNamespace allows setting the namespace for testing
func (*MockClient) SetWaitForJobCompletionError ¶
func (m *MockClient) SetWaitForJobCompletionError(err error)
SetWaitForJobCompletionError sets the error to return from WaitForJobCompletion
func (*MockClient) WaitForJobCompletion ¶
func (m *MockClient) WaitForJobCompletion(ctx context.Context, jobName string) error
WaitForJobCompletion mocks waiting for job completion
Click to show internal directories.
Click to hide internal directories.