Documentation ¶
Index ¶
- func AssertAnnotation(t *testing.T, annotation string, expected string, objectMeta metav1.ObjectMeta, ...)
- func AssertConfigMapEntryEquals(t *testing.T, resource *corev1.ConfigMap, key string, expected string, ...) string
- func AssertConfigMapHasEntry(t *testing.T, resource *corev1.ConfigMap, key string, kindMessage string) string
- func AssertDirContentsEqual(t *testing.T, expectedDir string, actualDir string)
- func AssertDirsExist(t *testing.T, expected bool, paths ...string)
- func AssertEqualFileText(t *testing.T, expectedFile string, actualFile string) error
- func AssertFileContains(t *testing.T, fileName string, containsText string)
- func AssertFileDoesNotContain(t *testing.T, fileName string, containsText string)
- func AssertFileNotExists(t *testing.T, path string)
- func AssertFilesExist(t *testing.T, expected bool, paths ...string)
- func AssertLabel(t *testing.T, label string, expected string, objectMeta metav1.ObjectMeta, ...)
- func AssertLoadFileText(t *testing.T, fileName string) (string, error)
- func AssertSecretEntryEquals(t *testing.T, secret *corev1.Secret, key string, expected string, ...) string
- func AssertTextFileContentsEqual(t *testing.T, expectedFile string, actualFile string)
- func AssertTextFilesEqual(t *testing.T, expected string, actual string, message string)
- func AssertYamlEqual(t *testing.T, expected string, actual string, message string, ...)
- func AssertYamlFilesEqual(t *testing.T, expectedFile string, actualFile string, message string, ...)
- func IsDebugLog() bool
- func ObjectNameMessage(objectMeta metav1.ObjectMeta, kindMessage string) string
- func RequireConfigMapExists(t *testing.T, client kubernetes.Interface, ns, name string) (*corev1.ConfigMap, string)
- func RequireSecretExists(t *testing.T, client kubernetes.Interface, ns, name string) (*corev1.Secret, string)
- func SkipForWindows(t *testing.T, reason string)
- func TestShouldDisableMaven() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAnnotation ¶
func AssertAnnotation(t *testing.T, annotation string, expected string, objectMeta metav1.ObjectMeta, kindMessage string)
AssertAnnotation asserts the object has the given annotation value
func AssertConfigMapEntryEquals ¶
func AssertConfigMapEntryEquals(t *testing.T, resource *corev1.ConfigMap, key string, expected string, kindMessage string) string
AssertConfigMapEntryEquals asserts the ConfigMap resource has the given data value
func AssertConfigMapHasEntry ¶
func AssertConfigMapHasEntry(t *testing.T, resource *corev1.ConfigMap, key string, kindMessage string) string
AssertConfigMapData asserts the ConfigMap resource has the given data value
func AssertDirContentsEqual ¶
AssertDirContentsEqual walks two directory structures and validates that the same files exist (by name) and that they have the same content
func AssertDirsExist ¶
AssertDirsExist asserts that the list of directory paths either exist or don't exist
func AssertEqualFileText ¶
func AssertFileContains ¶
AssertFileContains asserts that a given file exists and contains the given text
func AssertFileDoesNotContain ¶
AssertFileDoesNotContain asserts that a given file exists and does not contain the given text
func AssertFileNotExists ¶
AssertFileNotExists asserts that a file does not exist
func AssertFilesExist ¶
AssertFilesExist asserts that the list of file paths either exist or don't exist
func AssertLabel ¶
func AssertLabel(t *testing.T, label string, expected string, objectMeta metav1.ObjectMeta, kindMessage string)
AssertLabel asserts the object has the given label value
func AssertLoadFileText ¶
AssertLoadFileText asserts that the given file name can be loaded and returns the string contents
func AssertSecretEntryEquals ¶
func AssertSecretEntryEquals(t *testing.T, secret *corev1.Secret, key string, expected string, kindMessage string) string
AssertSecretEntryEquals asserts the Secret resource has the given value
func AssertTextFileContentsEqual ¶
AssertTextFileContentsEqual asserts that both the expected and actual files can be loaded as text and that their contents are identical
func AssertTextFilesEqual ¶
AssertTextFilesEqual asserts that the expected file matches the actual file contents
func AssertYamlEqual ¶
func AssertYamlEqual(t *testing.T, expected string, actual string, message string, args ...interface{})
AssertYamlEqual validates YAML without worrying about ordering of keys
func AssertYamlFilesEqual ¶
func AssertYamlFilesEqual(t *testing.T, expectedFile string, actualFile string, message string, args ...interface{})
AssertYamlFilesEqual validates YAML file names without worrying about ordering of keys
func ObjectNameMessage ¶
func ObjectNameMessage(objectMeta metav1.ObjectMeta, kindMessage string) string
ObjectNameMessage returns an object name message used in the tests
func RequireConfigMapExists ¶
func RequireConfigMapExists(t *testing.T, client kubernetes.Interface, ns, name string) (*corev1.ConfigMap, string)
RequireConfigMapExists requires that the given configMap exists
func RequireSecretExists ¶
func RequireSecretExists(t *testing.T, client kubernetes.Interface, ns, name string) (*corev1.Secret, string)
RequireSecretExists requires that the given secret exists
func SkipForWindows ¶
SkipForWindows skips tests if they are running on Windows This is to be used for valid tests that just don't work on windows for whatever reason
func TestShouldDisableMaven ¶
func TestShouldDisableMaven() bool
TestShouldDisableMaven should disable maven
Types ¶
This section is empty.