acceptanceTests

package module
v0.0.0-...-e52ba1f Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LongRetriesCount      = 100
	ShortRetriesCount     = 10
	DefaultApiServerPort  = shared.DefaultApiServerPort
	DefaultNamespaceName  = "mizu-tests"
	DefaultServiceName    = "httpbin"
	DefaultEntriesCount   = 50
	WaitAfterTapPodsReady = 3 * time.Second
	AllNamespaces         = ""
)

Variables

This section is empty.

Functions

func ApplyKubeFile

func ApplyKubeFile(kubeContext string, namespace string, filename string) error

func ApplyKubeFilesForTest

func ApplyKubeFilesForTest(t *testing.T, kubeContext string, namespace string, filename ...string) error

func CleanupCommand

func CleanupCommand(cmd *exec.Cmd) error

func Contains

func Contains(slice []string, containsValue string) bool

func ContainsPartOfValue

func ContainsPartOfValue(slice []string, containsValue string) bool

func DeleteKubeFile

func DeleteKubeFile(kubeContext string, namespace string, filename string) error

func ExecuteHttpGetRequest

func ExecuteHttpGetRequest(url string) (interface{}, error)

func ExecuteHttpGetRequestWithHeaders

func ExecuteHttpGetRequestWithHeaders(url string, headers map[string]string) (interface{}, error)

func ExecuteHttpPostRequestWithHeaders

func ExecuteHttpPostRequestWithHeaders(url string, headers map[string]string, body interface{}) (interface{}, error)

func ExecuteHttpRequest

func ExecuteHttpRequest(response *http.Response, requestErr error) (interface{}, error)

func GetApiServerUrl

func GetApiServerUrl(port uint16) string

func GetCliPath

func GetCliPath() (string, error)

func GetConfigPath

func GetConfigPath() (string, error)

func GetDefaultConfigCommandArgs

func GetDefaultConfigCommandArgs() []string

func GetDefaultLogsCommandArgs

func GetDefaultLogsCommandArgs() []string

func GetDefaultTapCommandArgs

func GetDefaultTapCommandArgs() []string

func GetDefaultTapCommandArgsWithRegex

func GetDefaultTapCommandArgsWithRegex(regex string) []string

func GetDefaultTapNamespace

func GetDefaultTapNamespace() []string

func GetKubeCurrentContextName

func GetKubeCurrentContextName() (string, error)

func GetLogsPath

func GetLogsPath() (string, error)

func GetMizuFolderPath

func GetMizuFolderPath() (string, error)

func GetProxyUrl

func GetProxyUrl(namespace string, service string) string

func JsonBytesToInterface

func JsonBytesToInterface(jsonBytes []byte) (interface{}, error)

func RetriesExecute

func RetriesExecute(retriesCount int, executeFunc func() error) error

func RunCypressTests

func RunCypressTests(t *testing.T, cypressRunCmd string)

func SetKubeCurrentContext

func SetKubeCurrentContext(contextName string) error

func SwitchKubeContextForTest

func SwitchKubeContextForTest(t *testing.T, newContextName string) error

func TryExecuteFunc

func TryExecuteFunc(executeFunc func() error) (err interface{})

func WaitTapPodsReady

func WaitTapPodsReady(apiServerUrl string) error

Types

type KubernetesProvider

type KubernetesProvider struct {
	// contains filtered or unexported fields
}

func NewKubernetesProvider

func NewKubernetesProvider() (*KubernetesProvider, error)

func (*KubernetesProvider) GetServiceExternalIp

func (kp *KubernetesProvider) GetServiceExternalIp(ctx context.Context, namespace string, service string) (string, error)

type PodDescriptor

type PodDescriptor struct {
	Name      string
	Namespace string
}

Jump to

Keyboard shortcuts

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