kubernetes/test/integration/storageversionmigrator/util.go

const secretKey

const secretVal

const secretName

const triggerSecretName

const svmName

const secondSVMName

const auditPolicyFileName

const auditLogFileName

const encryptionConfigFileName

const metricPrefix

const defaultNamespace

const crdName

const crdGroup

const servicePort

const webhookHandler

var resources

var v1CRDVersion

var v2CRDVersion

var v2StorageCRDVersion

var v1NotServingCRDVersion

type svmTest

func svmSetup(ctx context.Context, t *testing.T) *svmTest {}

func createKubeConfigFileForRestConfig(t *testing.T, restConfig *rest.Config) string {}

func createEncryptionConfig(t *testing.T, encryptionConfig string) (
	filePathForEncryptionConfig string,
	err error,
) {}

func (svm *svmTest) createSecret(ctx context.Context, t *testing.T, name, namespace string) (*corev1.Secret, error) {}

func (svm *svmTest) getRawSecretFromETCD(t *testing.T, name, namespace string) ([]byte, error) {}

func (svm *svmTest) getETCDPathForResource(t *testing.T, storagePrefix, group, resource, name, namespaceName string) string {}

func (svm *svmTest) readRawRecordFromETCD(t *testing.T, path string) (*clientv3.GetResponse, error) {}

func (svm *svmTest) getRawCRFromETCD(t *testing.T, name, namespace, crdGroup, crdName string) ([]byte, error) {}

func (svm *svmTest) updateFile(t *testing.T, configDir, filename string, newContent []byte) {}

func (svm *svmTest) createSVMResource(ctx context.Context, t *testing.T, name string, gvr svmv1alpha1.GroupVersionResource) (
	*svmv1alpha1.StorageVersionMigration,
	error,
) {}

func (svm *svmTest) getSVM(ctx context.Context, t *testing.T, name string) (
	*svmv1alpha1.StorageVersionMigration,
	error,
) {}

func setupAudit(t *testing.T) (
	policyFile *os.File,
	logFile *os.File,
) {}

func (svm *svmTest) getAutomaticReloadSuccessTotal(ctx context.Context, t *testing.T) int {}

func (svm *svmTest) isEncryptionConfigFileUpdated(ctx context.Context, t *testing.T, metricBeforeUpdate int) bool {}

// waitForResourceMigration checks following conditions:
// 1. The svm resource has SuccessfullyMigrated condition.
// 2. The audit log contains patch events for the given secret.
func (svm *svmTest) waitForResourceMigration(
	ctx context.Context,
	t *testing.T,
	svmName, name string,
	expectedEvents int,
) bool {}

func (svm *svmTest) countMatchingAuditEvents(t *testing.T, f func(utils.AuditEvent) bool) int {}

func (svm *svmTest) getAuditEvents(t *testing.T) []utils.AuditEvent {}

func (svm *svmTest) createCRD(
	t *testing.T,
	name, group string,
	certCtx *certContext,
	crdVersions []apiextensionsv1.CustomResourceDefinitionVersion,
) *apiextensionsv1.CustomResourceDefinition {}

func (svm *svmTest) updateCRD(
	ctx context.Context,
	t *testing.T,
	crdName string,
	updatesCRDVersions []apiextensionsv1.CustomResourceDefinitionVersion,
	expectedServingVersions []string,
	expectedStorageVersion string,
) {}

func (svm *svmTest) waitForCRDUpdate(
	ctx context.Context,
	t *testing.T,
	crdKind string,
	expectedServingVersions []string,
	expectedStorageVersion string,
) {}

type testingT

func (svm *svmTest) createCR(ctx context.Context, t testingT, crName, version string) *unstructured.Unstructured {}

func (svm *svmTest) getCR(ctx context.Context, t *testing.T, crName, version string) *unstructured.Unstructured {}

func (svm *svmTest) listCR(ctx context.Context, t *testing.T, version string) error {}

func (svm *svmTest) deleteCR(ctx context.Context, t testingT, name, version string) {}

func (svm *svmTest) createConversionWebhook(ctx context.Context, t *testing.T, certCtx *certContext) context.CancelFunc {}

type certContext

func (svm *svmTest) setupServerCert(t *testing.T) *certContext {}

func (svm *svmTest) isCRStoredAtVersion(t *testing.T, version, crName string) bool {}

func (svm *svmTest) isCRDMigrated(ctx context.Context, t *testing.T, crdSVMName, triggerCRName string) bool {}

type versions

func (svm *svmTest) validateRVAndGeneration(ctx context.Context, t *testing.T, crVersions map[string]versions, getCRVersion string) {}

func (svm *svmTest) createChaos(ctx context.Context, t *testing.T) {}

type ignoreFailures

func (ignoreFailures) Helper()                           {}

func (ignoreFailures) Fatalf(format string, args ...any) {}