Documentation ¶
Index ¶
- Constants
- func AddTestLabelsToMap(m map[string]string)
- func EnsureObjectExists(t *testing.T, obj *unstructured.Unstructured, c client.Client)
- func EnsureObjectsExist(t *testing.T, objs []*unstructured.Unstructured, c client.Client)
- func Equals(t *testing.T, o1, o2 interface{}) bool
- func FakeCRDs() []*apiextensions.CustomResourceDefinition
- func FakeCRDsWithHierarchicalResources() []*apiextensions.CustomResourceDefinition
- func FakeServiceMappings() []v1alpha1.ServiceMapping
- func FakeServiceMappingsWithHierarchicalResources() []v1alpha1.ServiceMapping
- func NewBarUnstructured(name, ns string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
- func NewFolderUnstructured(name, folderID string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
- func NewIAMServiceAccountUnstructured(name, namespace string) *unstructured.Unstructured
- func NewProjectUnstructured(name, projectID string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
- func NewSecretUnstructured(name, ns string, stringData map[string]interface{}) *unstructured.Unstructured
- func StringMatchesRegexList(t *testing.T, regexesToMatch []string, targetString string) bool
- func ToUnstruct(t *testing.T, bytes []byte) *unstructured.Unstructured
- func ToUnstructWithNamespace(t *testing.T, b []byte, namespace string) *unstructured.Unstructured
- func TrimLicenseHeaderFromTF(yaml string) string
- func TrimLicenseHeaderFromYaml(yaml string) string
- type TestType
Constants ¶
const Namespace = "namespace-1"
Variables ¶
This section is empty.
Functions ¶
func AddTestLabelsToMap ¶
AddTestLabelsToMap adds test labels to a map directly.
func EnsureObjectExists ¶
func EnsureObjectExists(t *testing.T, obj *unstructured.Unstructured, c client.Client)
func EnsureObjectsExist ¶
func EnsureObjectsExist(t *testing.T, objs []*unstructured.Unstructured, c client.Client)
func FakeCRDs ¶
func FakeCRDs() []*apiextensions.CustomResourceDefinition
func FakeCRDsWithHierarchicalResources ¶
func FakeCRDsWithHierarchicalResources() []*apiextensions.CustomResourceDefinition
FakeCRDsWithHierarchicalResources returns a CRD list which includes hierarchical resources to allow for the testing of resources that reference hierarchical resources (e.g. "Project")
func FakeServiceMappings ¶
func FakeServiceMappings() []v1alpha1.ServiceMapping
func FakeServiceMappingsWithHierarchicalResources ¶
func FakeServiceMappingsWithHierarchicalResources() []v1alpha1.ServiceMapping
FakeServiceMappingsWithHierarchicalResources returns a ServiceMapping list which includes hierarchical resources to allow for the testing of resources that reference hierarchical resources (e.g. "Project")
func NewBarUnstructured ¶
func NewBarUnstructured(name, ns string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
func NewFolderUnstructured ¶
func NewFolderUnstructured(name, folderID string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
func NewIAMServiceAccountUnstructured ¶
func NewIAMServiceAccountUnstructured(name, namespace string) *unstructured.Unstructured
func NewProjectUnstructured ¶
func NewProjectUnstructured(name, projectID string, readyStatus corev1.ConditionStatus) *unstructured.Unstructured
func NewSecretUnstructured ¶
func NewSecretUnstructured(name, ns string, stringData map[string]interface{}) *unstructured.Unstructured
func StringMatchesRegexList ¶
StringMatchesRegexList is a test utility that returns true if the string matches any regex in a list of strings.
if a regex fails to compile, the test will fail.
func ToUnstruct ¶
func ToUnstruct(t *testing.T, bytes []byte) *unstructured.Unstructured
func ToUnstructWithNamespace ¶
func ToUnstructWithNamespace(t *testing.T, b []byte, namespace string) *unstructured.Unstructured
func TrimLicenseHeaderFromTF ¶
TrimLicenseHeaderFromTF trims the license header in the tf string.
func TrimLicenseHeaderFromYaml ¶
TrimLicenseHeaderFromYaml trims the license header in the yaml string.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
testsconstants contains constants used in tests.
|
testsconstants contains constants used in tests. |