defaultnamespacetest

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterRoleBindingsShouldEqual

func ClusterRoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.ClusterRoleBinding, actual []rbacv1.ClusterRoleBinding)

func ClusterRolesShouldEqual

func ClusterRolesShouldEqual(t *testing.T, expected []*rbacv1.ClusterRole, actual []rbacv1.ClusterRole)

func NewApiResource

func NewApiResource(group string, version string, kind string, name string, namespaced bool) metav1.APIResource

func NewClusterAdminRole

func NewClusterAdminRole() *rbacv1.ClusterRole

func NewClusterRole

func NewClusterRole(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole

func NewClusterRoleBinding

func NewClusterRoleBinding(name string, subjects []rbacv1.Subject) *rbacv1.ClusterRoleBinding

func NewDefaultNamespace

func NewDefaultNamespace() *corev1.Namespace

func NewGroupSubjects

func NewGroupSubjects(names ...string) []rbacv1.Subject

func NewRole

func NewRole(name string, namespace string, rules []rbacv1.PolicyRule) *rbacv1.Role

func NewRoleBinding

func NewRoleBinding(name, namespace string, subjects []rbacv1.Subject) *rbacv1.RoleBinding

func NewRule

func NewRule(apiGroups []string, resources []string) rbacv1.PolicyRule

func NewServiceAccount

func NewServiceAccount(name string, namespace string) *corev1.ServiceAccount

func NewSingleResourceRule

func NewSingleResourceRule(apiGroup, resource string) rbacv1.PolicyRule

func NewSingletonRules

func NewSingletonRules(apiGroups []string, resources []string) []rbacv1.PolicyRule

func NewSingletonRulesNoResources

func NewSingletonRulesNoResources() []rbacv1.PolicyRule

func NewSingletonSASubjects

func NewSingletonSASubjects(name string, namespace string) []rbacv1.Subject

func RoleBindingsShouldEqual

func RoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.RoleBinding, actual []rbacv1.RoleBinding)

func RolesShouldEqual

func RolesShouldEqual(t *testing.T, expected []*rbacv1.Role, actual []rbacv1.Role)

func RulesShouldEqual

func RulesShouldEqual(t *testing.T, kind string, name string, expected []rbacv1.PolicyRule, actual []rbacv1.PolicyRule)

func ServiceAccountsShouldEqual

func ServiceAccountsShouldEqual(t *testing.T, expected []*corev1.ServiceAccount, actual []corev1.ServiceAccount)

func ServiceAccountsShouldEqualDeep added in v0.33.5

func ServiceAccountsShouldEqualDeep(t *testing.T, expected []*corev1.ServiceAccount, actual []corev1.ServiceAccount)

func SubjectsShouldEqual

func SubjectsShouldEqual(t *testing.T, kind string, name string, expected []rbacv1.Subject, actual []rbacv1.Subject)

Types

type ClientsetWithResources

type ClientsetWithResources struct {
	*clientgofake.Clientset
	// contains filtered or unexported fields
}

func NewClientSet

func NewClientSet(objects ...runtime.Object) *ClientsetWithResources

func (*ClientsetWithResources) Discovery

func (*ClientsetWithResources) WithResources

func (c *ClientsetWithResources) WithResources(resources ...metav1.APIResource) *ClientsetWithResources

type FakeDiscoveryWithResources

type FakeDiscoveryWithResources struct {
	fake.FakeDiscovery
}

func (*FakeDiscoveryWithResources) ServerPreferredResources

func (c *FakeDiscoveryWithResources) ServerPreferredResources() ([]*metav1.APIResourceList, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL