Documentation ¶
Index ¶
- Constants
- func CheckExternalServiceConditions(t *testing.T, registrationName string, opts *k8s.KubectlOptions)
- func CheckForPriorInstallations(t *testing.T, client kubernetes.Interface, options *helm.Options, ...)
- func Cleanup(t testutil.TestingTB, noCleanupOnFailure bool, noCleanup bool, cleanup func())
- func GetCRDRemoveFinalizers(t testutil.TestingTB, options *k8s.KubectlOptions)
- func MergeMaps(a, b map[string]string)
- func RandomName() string
- func RegisterExternalServiceCRD(t *testing.T, k8sOptions K8sOptions, consulOptions ConsulOptions)
- func RunCommand(t testutil.TestingTB, options *k8s.KubectlOptions, command Command) (string, error)
- func SetupInterruptHandler(cleanup func())
- func VerifyFederation(t *testing.T, primaryClient, secondaryClient *api.Client, releaseName string, ...)
- func WaitForInput(t *testing.T)
- type CRD
- type Command
- type ConsulOptions
- type K8sOptions
Constants ¶
const DEFAULT_PAUSE_PORT = "38501"
Variables ¶
This section is empty.
Functions ¶
func CheckExternalServiceConditions ¶
func CheckExternalServiceConditions(t *testing.T, registrationName string, opts *k8s.KubectlOptions)
func CheckForPriorInstallations ¶
func CheckForPriorInstallations(t *testing.T, client kubernetes.Interface, options *helm.Options, chartName, labelSelector string)
CheckForPriorInstallations checks if there is an existing Helm release for this Helm chart already installed. If there is, it fails the tests.
func Cleanup ¶
Cleanup will both register a cleanup function with t and SetupInterruptHandler to make sure resources get cleaned up if an interrupt signal is caught.
func GetCRDRemoveFinalizers ¶
func GetCRDRemoveFinalizers(t testutil.TestingTB, options *k8s.KubectlOptions)
getCRDRemoveFinalizers gets CRDs with finalizers and removes them.
func MergeMaps ¶
MergeMaps will merge the values in b with values in a and save in a. If there are conflicts, the values in b will overwrite the values in a.
func RandomName ¶
func RandomName() string
RandomName generates a random string with a 'test-' prefix.
func RegisterExternalServiceCRD ¶
func RegisterExternalServiceCRD(t *testing.T, k8sOptions K8sOptions, consulOptions ConsulOptions)
func RunCommand ¶
func SetupInterruptHandler ¶
func SetupInterruptHandler(cleanup func())
SetupInterruptHandler sets up a goroutine that will wait for interrupt signals and call cleanup function when it catches it.
func VerifyFederation ¶
func VerifyFederation(t *testing.T, primaryClient, secondaryClient *api.Client, releaseName string, secure bool)
VerifyFederation checks that the WAN federation between servers is successful by first checking members are alive from the perspective of both servers. If secure is true, it will also check that the ACL replication is running on the secondary server.
func WaitForInput ¶
WaitForInput starts a http server on a random port (which is output in the logs) and waits until you issue a request to that endpoint to continue the tests. This is useful for debugging tests that require inspecting the current state of a running cluster and you don't need to use long sleeps.
Types ¶
type CRD ¶
type CRD struct { Items []struct { Metadata struct { Name string `json:"name"` Finalizers []string `json:"finalizers"` } `json:"metadata"` } `json:"items"` }
CRD struct to parse CRD JSON output.
type ConsulOptions ¶
type K8sOptions ¶
type K8sOptions struct { Options *k8s.KubectlOptions NoCleanupOnFailure bool NoCleanup bool KustomizeConfigPath string }