k8stest

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestServices

func CreateTestServices(name, namespace string, port int32) v1.Service

CreateTestServices creates a mocked service for testing purposes

func InitializeMockedKubernetesClient

func InitializeMockedKubernetesClient(services []v1.Service)

InitializeMockedKubernetesClient initializes a MockKubernetesClient with a given list of services

Types

type MockKubernetesClient

type MockKubernetesClient struct {
	Services []v1.Service
}

MockKubernetesClient is a mocked implementation of k8s.KubernetesClientApi

func GetMockedKubernetesClient

func GetMockedKubernetesClient() *MockKubernetesClient

GetMockedKubernetesClient returns a mocked implementation of k8s.KubernetesClientApi

func (*MockKubernetesClient) GetServices

func (mock *MockKubernetesClient) GetServices(namespace string) ([]v1.Service, error)

GetServices returns a list of services in a given namespace

Jump to

Keyboard shortcuts

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