tests

package
Version: v0.0.0-...-bdebfc3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultApplicationServiceAccount = "eirini"

Variables

This section is empty.

Functions

func CopyRolesAndBindings

func CopyRolesAndBindings(namespace string, clientset kubernetes.Interface)

func CreatePodCreationPSP

func CreatePodCreationPSP(namespace, pspName, serviceAccountName string, clientset kubernetes.Interface) error

func CreateRandomNamespace

func CreateRandomNamespace(clientset kubernetes.Interface) string

func DeleteNamespace

func DeleteNamespace(namespace string, clientset kubernetes.Interface) error

func DeletePSP

func DeletePSP(name string, clientset kubernetes.Interface) error

func EatsFailHandler

func EatsFailHandler(message string, callerSkip ...int)

func ExposeAsService

func ExposeAsService(clientset kubernetes.Interface, namespace, guid string, appPort int32, pingPath ...string) string

func GenerateGUID

func GenerateGUID() string

func GenerateKeyPair

func GenerateKeyPair(name string) (string, string)

func GenerateKeyPairDir

func GenerateKeyPairDir(name, domain string) (string, []byte)

GenerateKeyPairDir generates a key pair in a temporary folder, returning its path and the authority PEM. The two files will be called <name>.crt and <name>.key

func GetApplicationServiceAccount

func GetApplicationServiceAccount() string

func GetEiriniAddress

func GetEiriniAddress() string

func GetEiriniDockerHubPassword

func GetEiriniDockerHubPassword() string

func GetEiriniSystemNamespace

func GetEiriniSystemNamespace() string

func GetEiriniWorkloadsNamespace

func GetEiriniWorkloadsNamespace() string

func GetKubeconfig

func GetKubeconfig() string

func GetTelepresencePort

func GetTelepresencePort() int

func GetTelepresenceServiceName

func GetTelepresenceServiceName() string

func NewWiremock

func NewWiremock() *wiremock.Wiremock

func RequestServiceFn

func RequestServiceFn(namespace, serviceName string, port int32, requestPath string) func() (string, error)

func RetryResolveHost

func RetryResolveHost(host, failureMessage string)

func WriteTempFile

func WriteTempFile(content []byte, fileName string) string

Types

type EATSFixture

type EATSFixture struct {
	Fixture

	Wiremock         *wiremock.Wiremock
	DynamicClientset dynamic.Interface
	// contains filtered or unexported fields
}

func NewEATSFixture

func NewEATSFixture(baseFixture Fixture, dynamicClientset dynamic.Interface, wiremock *wiremock.Wiremock) *EATSFixture

func (*EATSFixture) GetEiriniHTTPClient

func (f *EATSFixture) GetEiriniHTTPClient() *http.Client

func (*EATSFixture) GetEiriniWorkloadsNamespace

func (f *EATSFixture) GetEiriniWorkloadsNamespace() string

func (*EATSFixture) GetNATSPassword

func (f *EATSFixture) GetNATSPassword() string

func (*EATSFixture) SetUp

func (f *EATSFixture) SetUp()

func (*EATSFixture) TearDown

func (f *EATSFixture) TearDown()

type Fixture

type Fixture struct {
	Clientset      kubernetes.Interface
	Namespace      string
	PspName        string
	KubeConfigPath string
	Writer         io.Writer
	// contains filtered or unexported fields
}

func NewFixture

func NewFixture(writer io.Writer) *Fixture

func (*Fixture) CreateExtraNamespace

func (f *Fixture) CreateExtraNamespace() string

func (*Fixture) Destroy

func (f *Fixture) Destroy()

func (*Fixture) NextAvailablePort

func (f *Fixture) NextAvailablePort() int

func (*Fixture) SetUp

func (f *Fixture) SetUp()

func (*Fixture) TearDown

func (f *Fixture) TearDown()

Directories

Path Synopsis
eats
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL