kube

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

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) CreateJob

func (m *MockClient) CreateJob(ctx context.Context, job *batchv1.Job) (*batchv1.Job, error)

CreateJob mocks job creation

func (*MockClient) DeleteJob

func (m *MockClient) DeleteJob(ctx context.Context, jobName string) error

func (*MockClient) GetJobLogs

func (m *MockClient) GetJobLogs(ctx context.Context, jobName string) (string, error)

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

Jump to

Keyboard shortcuts

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