Documentation ¶
Index ¶
- 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 RegisterExternalService(t *testing.T, consulClient *api.Client, namespace, name, address string, ...)
- 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, ...)
- type CRD
- type Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 RegisterExternalService ¶
func RegisterExternalService(t *testing.T, consulClient *api.Client, namespace, name, address string, port int)
RegisterExternalService registers an external service to a virtual node in Consul for testing purposes. This function takes a testing.T object, a Consul client, service namespace, service name, address, and port as parameters. It registers the service with Consul, and if a namespace is provided, it also creates the namespace in Consul. It uses the provided testing.T object to log registration details and verify the registration process. If the registration fails, the test calling the function will fail.
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.