fixtures

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 33 Imported by: 60

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowAllSchema added in v0.21.0

func AllowAllSchema() *apiextensionsv1.CustomResourceValidation

AllowAllSchema doesn't enforce any schema restrictions

func CreateCRDUsingRemovedAPI added in v0.21.0

func CreateCRDUsingRemovedAPI(etcdClient *clientv3.Client, etcdStoragePrefix string, betaCRD *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, dynamicClientSet dynamic.Interface) (*apiextensionsv1.CustomResourceDefinition, error)

CreateCRDUsingRemovedAPI creates a CRD directly using etcd. This is must *ONLY* be used for checks of compatibility with removed data. Do not use this just because you don't want to update your test to use v1. Only use this when it actually matters.

func CreateCRDUsingRemovedAPIWatchUnsafe added in v0.22.0

func CreateCRDUsingRemovedAPIWatchUnsafe(etcdClient *clientv3.Client, etcdStoragePrefix string, betaCRD *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) (*apiextensionsv1.CustomResourceDefinition, error)

CreateCRDUsingRemovedAPIWatchUnsafe creates a CRD directly using etcd. This is must *ONLY* be used for checks of compatibility with removed data. Do not use this just because you don't want to update your test to use v1. Only use this when it actually matters.

func CreateNewV1CustomResourceDefinition added in v0.16.4

func CreateNewV1CustomResourceDefinition(v1CRD *apiextensionsv1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, dynamicClientSet dynamic.Interface) (*apiextensionsv1.CustomResourceDefinition, error)

CreateNewV1CustomResourceDefinition creates the given CRD and makes sure its watch cache is primed on the server.

func CreateNewV1CustomResourceDefinitionWatchUnsafe added in v0.16.4

func CreateNewV1CustomResourceDefinitionWatchUnsafe(v1CRD *apiextensionsv1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) (*apiextensionsv1.CustomResourceDefinition, error)

CreateNewV1CustomResourceDefinitionWatchUnsafe creates the CRD and makes sure the apiextension apiserver has installed the CRD. But it's not safe to watch the created CR. Please call CreateNewV1CustomResourceDefinition if you need to watch the CR.

func CreateNewVersionedScaleClient

func CreateNewVersionedScaleClient(crd *apiextensionsv1.CustomResourceDefinition, config *rest.Config, version string) (scale.ScalesGetter, error)

CreateNewVersionedScaleClient returns a scale client.

func DeleteV1CustomResourceDefinition added in v0.16.4

func DeleteV1CustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error

DeleteV1CustomResourceDefinition deletes a CRD and waits until it disappears from discovery.

func DeleteV1CustomResourceDefinitions added in v0.16.4

func DeleteV1CustomResourceDefinitions(deleteListOpts metav1.ListOptions, apiExtensionsClient clientset.Interface) error

DeleteV1CustomResourceDefinitions deletes all CRD matching the provided deleteListOpts and waits until all the CRDs disappear from discovery.

func GetGroupVersionResourcesOfCustomResource added in v0.23.0

func GetGroupVersionResourcesOfCustomResource(crd *apiextensionsv1.CustomResourceDefinition) []schema.GroupVersionResource

GetGroupVersionResourcesOfCustomResource gets all GroupVersionResources for custom resources of the CustomResourceDefinition.

func IntegrationEtcdServers

func IntegrationEtcdServers() []string

IntegrationEtcdServers returns etcd server URLs.

func NewCurletInstance

func NewCurletInstance(namespace, name string) *unstructured.Unstructured

NewCurletInstance returns a Curlet instance.

func NewCurletV1CustomResourceDefinition added in v0.21.0

func NewCurletV1CustomResourceDefinition(scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition

NewCurletV1CustomResourceDefinition returns a Curlet CRD.

func NewMultipleVersionNoxuCRD

NewMultipleVersionNoxuCRD returns a WishIHadChosenNoxu with multiple versions.

func NewNoxu2CustomResourceDefinition

func NewNoxu2CustomResourceDefinition(scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition

NewNoxu2CustomResourceDefinition returns a WishIHadChosenNoxu2 CRD.

func NewNoxuInstance

func NewNoxuInstance(namespace, name string) *unstructured.Unstructured

NewNoxuInstance returns a WishIHadChosenNoxu instance for v1beta1.

func NewNoxuV1CustomResourceDefinition added in v0.16.4

func NewNoxuV1CustomResourceDefinition(scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition

NewNoxuV1CustomResourceDefinition returns a WishIHadChosenNoxu CRD.

func NewRandomNameMultipleVersionCustomResourceDefinition added in v0.21.0

func NewRandomNameMultipleVersionCustomResourceDefinition(scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition

NewRandomNameMultipleCustomResourceDefinition generates a multi version CRD with random name to avoid name conflict in e2e tests

func NewRandomNameV1CustomResourceDefinition added in v0.16.4

func NewRandomNameV1CustomResourceDefinition(scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition

NewRandomNameV1CustomResourceDefinition generates a CRD with random name to avoid name conflict in e2e tests

func NewRandomNameV1CustomResourceDefinitionWithSchema added in v0.23.0

func NewRandomNameV1CustomResourceDefinitionWithSchema(scope apiextensionsv1.ResourceScope, openAPIV3Schema *apiextensionsv1.JSONSchemaProps, enableStatus bool) *apiextensionsv1.CustomResourceDefinition

NewRandomNameV1CustomResourceDefinitionWithSchema generates a CRD with random name and the provided OpenAPIv3 schema to avoid name conflict in e2e tests

func NewVersionedNoxuInstance

func NewVersionedNoxuInstance(namespace, name, version string) *unstructured.Unstructured

NewVersionedNoxuInstance returns a WishIHadChosenNoxu instance for a given version

func StartDefaultServer

StartDefaultServer starts a test server.

func StartDefaultServerWithClients

func StartDefaultServerWithClients(t servertesting.Logger, extraFlags ...string) (func(), clientset.Interface, dynamic.Interface, error)

StartDefaultServerWithClients starts a test server and returns clients for it.

func StartDefaultServerWithClientsAndEtcd added in v0.21.0

func StartDefaultServerWithClientsAndEtcd(t servertesting.Logger, extraFlags ...string) (func(), clientset.Interface, dynamic.Interface, *clientv3.Client, string, error)

StartDefaultServerWithClientsAndEtcd starts a test server and returns clients for it.

func StartDefaultServerWithConfigAccess added in v0.26.0

func StartDefaultServerWithConfigAccess(t servertesting.Logger, flags ...string) (func(), *rest.Config, apiserver.CompletedConfig, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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