Documentation ¶
Index ¶
- Constants
- func AssertJSONEqual(t *testing.T, expected, actual interface{})
- func CreateAppReplicaSet(name string) *appsv1.ReplicaSet
- func CreateCRD(name string) *apiextv1beta1.CustomResourceDefinition
- func CreateClusterRole(name string) *rbacv1.ClusterRole
- func CreateClusterRoleBinding(name, roleName string, subjects []rbacv1.Subject) *rbacv1.ClusterRoleBinding
- func CreateConfigMap(name string) *corev1.ConfigMap
- func CreateCronJob(name string) *batchv1beta1.CronJob
- func CreateCustomResource(name string) *unstructured.Unstructured
- func CreateDaemonSet(name string) *appsv1.DaemonSet
- func CreateDeployment(name string) *appsv1.Deployment
- func CreateEvent(name string) *corev1.Event
- func CreateExtReplicaSet(name string) *extv1beta1.ReplicaSet
- func CreateIngress(name string) *extv1beta1.Ingress
- func CreateJob(name string) *batchv1.Job
- func CreateNode(name string) *corev1.Node
- func CreatePersistentVolumeClaim(name string) *corev1.PersistentVolumeClaim
- func CreatePod(name string) *corev1.Pod
- func CreateReplicationController(name string) *corev1.ReplicationController
- func CreateRole(name string) *rbacv1.Role
- func CreateRoleBinding(roleBindingName, roleName string, subjects []rbacv1.Subject) *rbacv1.RoleBinding
- func CreateRoleBindingSubject(kind, name, namespace string) *rbacv1.Subject
- func CreateSecret(name string) *corev1.Secret
- func CreateService(name string) *corev1.Service
- func CreateServiceAccount(name string) *corev1.ServiceAccount
- func CreateStatefulSet(name string) *appsv1.StatefulSet
- func CreateTimestamp() *metav1.Time
- func LoadObjectFromFile(t *testing.T, objectFile string) runtime.Object
- func LoadTypedObjectFromFile(t *testing.T, objectFile string, into runtime.Object)
- func Time() time.Time
- func ToOwnerReferences(t *testing.T, object runtime.Object) []metav1.OwnerReference
- func ToUnstructured(t *testing.T, object runtime.Object) *unstructured.Unstructured
- func ToUnstructuredList(t *testing.T, objects ...runtime.Object) *unstructured.UnstructuredList
Constants ¶
const DefaultNamespace = "namespace"
DefaultNamespace is the namespace that objects will belong to.
Variables ¶
This section is empty.
Functions ¶
func AssertJSONEqual ¶
AssertJSONEqual asserts two object's generated JSON is equal.
func CreateAppReplicaSet ¶
func CreateAppReplicaSet(name string) *appsv1.ReplicaSet
CreateAppReplicaSet creates a replica set
func CreateCRD ¶
func CreateCRD(name string) *apiextv1beta1.CustomResourceDefinition
CreateCRD creates a CRD
func CreateClusterRole ¶
func CreateClusterRole(name string) *rbacv1.ClusterRole
CreateClusterRole creates a cluster role.
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(name, roleName string, subjects []rbacv1.Subject) *rbacv1.ClusterRoleBinding
CreateClusterRoleBinding creates a cluster role binding
func CreateConfigMap ¶
CreateConfigMap creates a config map.
func CreateCronJob ¶
func CreateCronJob(name string) *batchv1beta1.CronJob
func CreateCustomResource ¶
func CreateCustomResource(name string) *unstructured.Unstructured
CreateCustomResource creates a custom resource.
func CreateDaemonSet ¶
CreateDaemonSet creates a daemon set
func CreateDeployment ¶
func CreateDeployment(name string) *appsv1.Deployment
CreateDeployment creates a deployment
func CreateExtReplicaSet ¶
func CreateExtReplicaSet(name string) *extv1beta1.ReplicaSet
CreateExtReplicaSet creates a replica set
func CreateIngress ¶
func CreateIngress(name string) *extv1beta1.Ingress
CreateIngress creates an ingress
func CreateNode ¶ added in v0.5.0
func CreatePersistentVolumeClaim ¶
func CreatePersistentVolumeClaim(name string) *corev1.PersistentVolumeClaim
CreatePersistentVolumeClaim creates a persistent volume claim
func CreateReplicationController ¶
func CreateReplicationController(name string) *corev1.ReplicationController
CreateReplicationController creates a replication controller
func CreateRoleBinding ¶
func CreateRoleBinding(roleBindingName, roleName string, subjects []rbacv1.Subject) *rbacv1.RoleBinding
func CreateService ¶
CreateService creates a service
func CreateServiceAccount ¶
func CreateServiceAccount(name string) *corev1.ServiceAccount
CreateServiceAccount creates a service account
func CreateStatefulSet ¶
func CreateStatefulSet(name string) *appsv1.StatefulSet
CreateStatefulSet creates a stateful set
func CreateTimestamp ¶ added in v0.4.1
func LoadObjectFromFile ¶
LoadObjectFromFile loads a file from the `testdata` directory. It will assign it a `default` namespace if one is not set.
func LoadTypedObjectFromFile ¶
LoadTypedObjectFromFile loads a file from the `testdata` directory. It will assign it a `default` namespace if one is not set.
func ToOwnerReferences ¶
ToOwnerReferences converts an object to owner references.
func ToUnstructured ¶
func ToUnstructured(t *testing.T, object runtime.Object) *unstructured.Unstructured
ToUnstructured converts an object to an unstructured.
func ToUnstructuredList ¶
func ToUnstructuredList(t *testing.T, objects ...runtime.Object) *unstructured.UnstructuredList
ToUnstructuredList converts a list of objects to a list of unstructured.
Types ¶
This section is empty.