test

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TODO: would be nice to get this from "github.com/ninech/apis/apps/v1alpha1"
	AppSizeNotSet apps.ApplicationSize = ""
	AppMicro      apps.ApplicationSize = "micro"
	AppMini       apps.ApplicationSize = "mini"
	AppStandard1  apps.ApplicationSize = "standard-1"

	StatusSuperseded apps.ReleaseProcessStatus = "superseded"
	StatusAvailable  apps.ReleaseProcessStatus = "available"
)

Functions

func CountLines

func CountLines(s string) int

func CreateTestKubeconfig

func CreateTestKubeconfig(client *api.Client, organization string) (string, error)

CreateTestKubeconfig creates a test kubeconfig which contains a nctl extension config with the given organization

func GenerateED25519PrivateKey added in v1.3.0

func GenerateED25519PrivateKey() (string, error)

GenerateED25519PrivateKey generates an ED25519 private key

func GenerateRSAPrivateKey added in v1.3.0

func GenerateRSAPrivateKey() (string, error)

GenerateRSAPrivateKey generates an RSA private key

func KeyValueStore added in v1.4.0

func KeyValueStore(name, project, location string) *storage.KeyValueStore

func MustParseTime

func MustParseTime(format string, value string) time.Time

func MySQL added in v1.4.0

func MySQL(name, project, location string) *storage.MySQL

func NewGitInformationService added in v1.3.0

func NewGitInformationService() *gitInformationService

NewGitInformationService returns a new git information service mock. It can be used to verify requests sent to it and also to just return with a previously set response.

func Projects

func Projects(organization string, names ...string) []client.Object

Projects returns projects with the given organization namespace set

func SetupClient

func SetupClient(initObjs ...client.Object) (*api.Client, error)

Types

type GitInfoServiceParsed added in v1.3.0

type GitInfoServiceParsed struct {
	Token   string
	Method  string
	Request apps.GitExploreRequest
}

GitInfoServiceParsed represents are parsed request received by the git information service

type GitInformationServiceResponse added in v1.3.0

type GitInformationServiceResponse struct {
	// Code is the status code to be set
	Code int
	// Content describes the GitExploreResponse to be returned.
	Content apps.GitExploreResponse
	// Raw allows to return any text instead of a real GitExploreResponse.
	// If it is set, it has precedence over the Content field.
	Raw *string
}

GitInformationServiceResponse describes a response of the git information service

type VerifyRequestFunc added in v1.3.0

type VerifyRequestFunc func(p GitInfoServiceParsed, err error)

VerifyRequestFunc can be used to verify the parsed request which was sent to the git information service

Jump to

Keyboard shortcuts

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