syncertest

package
v1.13.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Token = "b38239ea8f58eaed17af6734bd6a025eeafccda1"

Token is a test sync token.

Variables

View Source
var (
	// Converter is an unstructured.Unstructured converter used for testing.
	Converter = runtime.NewTestUnstructuredConverter(conversion.EqualitiesOrDie())

	// ManagementEnabled sets management labels and annotations on the object.
	ManagementEnabled core.MetaMutator = func(obj client.Object) {
		core.SetAnnotation(obj, metadata.ResourceManagementKey, metadata.ResourceManagementEnabled)
		core.SetAnnotation(obj, metadata.ResourceIDKey, core.GKNN(obj))
		core.SetLabel(obj, metadata.ManagedByKey, metadata.ManagedByValue)
	}
	// ManagementDisabled sets the management disabled annotation on the object.
	ManagementDisabled = core.Annotation(metadata.ResourceManagementKey, metadata.ResourceManagementDisabled)
	// ManagementInvalid sets an invalid management annotation on the object.
	ManagementInvalid = core.Annotation(metadata.ResourceManagementKey, "invalid")
	// TokenAnnotation sets the sync token annotation on the object
	TokenAnnotation = core.Annotation(metadata.SyncTokenAnnotationKey, Token)
)

Functions

func ClusterConfigImportTime

func ClusterConfigImportTime(time metav1.Time) fake.ClusterConfigMutator

ClusterConfigImportTime adds an ImportTime to a ClusterConfig.

func ClusterConfigImportToken

func ClusterConfigImportToken(t string) fake.ClusterConfigMutator

ClusterConfigImportToken adds an import token to a ClusterConfig.

func ClusterConfigSyncTime

func ClusterConfigSyncTime() fake.ClusterConfigMutator

ClusterConfigSyncTime adds a SyncTime to a ClusterConfig.

func ClusterConfigSyncToken

func ClusterConfigSyncToken() fake.ClusterConfigMutator

ClusterConfigSyncToken adds a sync token to a ClusterConfig.

func MarkForDeletion

func MarkForDeletion() core.MetaMutator

MarkForDeletion marks a NamespaceConfig with an intent to be delete

func NamespaceConfigImportTime

func NamespaceConfigImportTime(time metav1.Time) core.MetaMutator

NamespaceConfigImportTime adds an ImportTime to a Namespace Config.

func NamespaceConfigImportToken

func NamespaceConfigImportToken(t string) core.MetaMutator

NamespaceConfigImportToken adds an import token to a Namespace Config.

func NamespaceConfigSyncTime

func NamespaceConfigSyncTime() core.MetaMutator

NamespaceConfigSyncTime adds a sync time to a Namespace Config.

func NamespaceConfigSyncToken

func NamespaceConfigSyncToken() core.MetaMutator

NamespaceConfigSyncToken adds a sync token to a Namespace Config.

func Now

func Now() metav1.Time

Now returns a stubbed time, at epoch.

func ToUnstructuredList

func ToUnstructuredList(t *testing.T, converter runtime.UnstructuredConverter, objs ...client.Object) []*unstructured.Unstructured

ToUnstructuredList converts the objects to an unstructured.UnstructedList.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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