Documentation ¶
Index ¶
- func AnnotateNSDefaultAnnotations(ns string)
- func AnnotateNSSecondaryRoot(ns string)
- func CleanupTestGroup(groupName string)
- func CleanupTestMigrationHierarchies(randPrefix string)
- func CleanupTestNamespaces(randPrefix string)
- func CleanupTestUsers(randPrefix string)
- func ComplexFieldShouldContain(resource, ns, nm, field, want string)
- func CreateGroup(g, u, randPrefix string)
- func CreateMigrationHierarchy(currentns, tons string, user string) string
- func CreatePod(ns, name, randPrefix, cpu, memory string)
- func CreateResourceQuota(nm, nsnm string, args ...string)
- func CreateRootNS(nm, randPrefix string, rqDepth int)
- func CreateSubnamespace(nm, nsnm, randPrefix string, isRp bool, args ...string)
- func CreateSubnamespaceWithScope(nm, nsnm, randPrefix string, isRp bool, operatorValue string, args ...string)
- func CreateUpdateQuota(nm, nsnm, dsnm, user string, args ...string)
- func CreateUser(u, randPrefix string)
- func FieldShouldContain(resource, ns, nm, field, want string)
- func FieldShouldNotContain(resource, ns, nm, field, want string)
- func GenerateE2EGroupName(nm string) string
- func GenerateE2EName(nm, testPrefix, randPrefix string) string
- func GenerateE2EUserName(nm string) string
- func GrantTestingUserAdmin(user, ns string)
- func GrantTestingUserClusterAdmin(user string)
- func LabelNSDefaultLabels(ns string)
- func LabelTestingMigrationHierarchies(mh, randPrefix string)
- func LabelTestingNs(ns, randPrefix string)
- func MustApplyYAML(s string)
- func MustApplyYAMLAsUser(s, u string)
- func MustNotApplyYAML(s string)
- func MustNotApplyYAMLAsUser(s, u string)
- func MustNotRun(cmdln ...string)
- func MustRun(cmdln ...string)
- func RandStr() string
- func RunCommand(cmdln ...string) (string, error)
- func RunShouldContain(substr string, seconds float64, cmdln ...string)
- func RunShouldNotContain(substr string, seconds float64, cmdln ...string)
- func ShouldNotCreateMigrationHierarchy(currentns, tons string)
- func ShouldNotCreateSubnamespace(nm, nsnm string, isRp bool, args ...string)
- func ShouldNotCreateUpdateQuota(nm, nsnm, dsnm, user string, args ...string)
- func ShouldNotUpdateSubnamespace(nm, nsnm string, isRp bool, args ...string)
- func TryRun(cmdln ...string) error
- func TryRunQuietly(cmdln ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateNSDefaultAnnotations ¶ added in v1.1.1
func AnnotateNSDefaultAnnotations(ns string)
AnnotateNSDefaultAnnotations annotates a namespace with the default annotations.
func AnnotateNSSecondaryRoot ¶
func AnnotateNSSecondaryRoot(ns string)
AnnotateNSSecondaryRoot annotates a namespace as secondary root.
func CleanupTestGroup ¶
func CleanupTestGroup(groupName string)
CleanupTestGroups deletes a specific group
func CleanupTestMigrationHierarchies ¶
func CleanupTestMigrationHierarchies(randPrefix string)
CleanupTestMigrationHierarchies finds the list of migrationhierarchies labeled as test migrationhierarchies and delegates to cleanupMigrationHierarchies function.
func CleanupTestNamespaces ¶
func CleanupTestNamespaces(randPrefix string)
CleanupTestNamespaces finds the list of namespaces labeled as test namespaces and delegates to cleanupNamespaces function.
func CleanupTestUsers ¶
func CleanupTestUsers(randPrefix string)
CleanupTestUsers finds the list of users labeled as test namespaces and delegates to cleanupUsers function
func ComplexFieldShouldContain ¶
func ComplexFieldShouldContain(resource, ns, nm, field, want string)
func CreateGroup ¶
func CreateGroup(g, u, randPrefix string)
CreateGroup creates the specified Group.
func CreateMigrationHierarchy ¶
CreateMigrationHierarchy creates the specified MigrationHierarchy.
func CreatePod ¶
func CreatePod(ns, name, randPrefix, cpu, memory string)
CreatePod creates a pod in the specified namespace with the required cpu and memory(Gi).
func CreateResourceQuota ¶
CreateResourceQuota creates/updates a ResourceQuota object in a given namespace and with the given resources.
func CreateRootNS ¶
CreateRootNS creates/updates a root name with a given name and with the required labels.
func CreateSubnamespace ¶
CreateSubnamespace creates/updates the specified Subnamespace in the parent namespace with canned testing labels making it easier to look up and delete later, and with the given resources.
func CreateSubnamespaceWithScope ¶
func CreateSubnamespaceWithScope(nm, nsnm, randPrefix string, isRp bool, operatorValue string, args ...string)
CreateSubnamespaceWithScope creates/updates the specified Subnamespace in the parent namespace with canned testing labels making it easier to look up and delete later, and with the given resources.
func CreateUpdateQuota ¶
CreateUpdateQuota creates the specified UpdateQuota in the parent namespace with canned testing labels making it easier to look up and delete later, and with the given resources.
func FieldShouldContain ¶
func FieldShouldContain(resource, ns, nm, field, want string)
func FieldShouldNotContain ¶
func FieldShouldNotContain(resource, ns, nm, field, want string)
func GenerateE2EGroupName ¶
func GenerateE2EName ¶
GenerateE2EName generates a name for a namespace and subnamespace.
func GenerateE2EUserName ¶
GenerateE2EUserName generates a name for a namespace and subnamespace.
func GrantTestingUserAdmin ¶
func GrantTestingUserAdmin(user, ns string)
GrantTestingUserAdmin gives admin rolebinding to a user on a namnamespace.
func GrantTestingUserClusterAdmin ¶
func GrantTestingUserClusterAdmin(user string)
GrantTestingUserClusterAdmin gives cluster-admin cluster-rolebinding to a user.
func LabelNSDefaultLabels ¶ added in v1.1.1
func LabelNSDefaultLabels(ns string)
LabelNSDefaultLabels labels a namespace with the default labels.
func LabelTestingMigrationHierarchies ¶
func LabelTestingMigrationHierarchies(mh, randPrefix string)
LabelTestingMigrationHierarchies marks testing migrationhierarchies with a label for future search and lookup.
func LabelTestingNs ¶
func LabelTestingNs(ns, randPrefix string)
LabelTestingNs marks testing namespaces with a label for future search and lookup.
func MustApplyYAML ¶
func MustApplyYAML(s string)
func MustApplyYAMLAsUser ¶
func MustApplyYAMLAsUser(s, u string)
func MustNotApplyYAML ¶
func MustNotApplyYAML(s string)
func MustNotApplyYAMLAsUser ¶
func MustNotApplyYAMLAsUser(s, u string)
func MustNotRun ¶
func MustNotRun(cmdln ...string)
func RunCommand ¶
RunCommand passes all arguments to the OS to execute, and returns the combined stdout/stderr and error object. By default, each arg to this function may contain strings (e.g. "echo hello world"), in which case we split the strings on the spaces (so this would be equivalent to calling "echo", "hello", "world"). If you _actually_ need an OS argument with strings in it, pass it as an argument to this function surrounded by double quotes (e.g. "echo", "\"hello world\"" will be passed to the OS as two args, not three).
func RunShouldContain ¶
func RunShouldNotContain ¶
func ShouldNotCreateMigrationHierarchy ¶
func ShouldNotCreateMigrationHierarchy(currentns, tons string)
ShouldNotCreateMigrationHierarchy should not be able to create the specified MigrationHierarchy.
func ShouldNotCreateSubnamespace ¶
ShouldNotCreateSubnamespace should not be able to create the specified Subnamespace in the parent namespace and with the given resources.
func ShouldNotCreateUpdateQuota ¶
ShouldNotCreateUpdateQuota should not be able to create the specified UpdateQuota in the parent namespace and with the given resources.
func ShouldNotUpdateSubnamespace ¶
ShouldNotUpdateSubnamespace should not be able to create the specified Subnamespace in the parent namespace and with the given resources.
func TryRunQuietly ¶
Types ¶
This section is empty.