fixture

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package fixture provides setup helpers for resources whose teardown is pure cleanup rather than part of what a test asserts. Each helper creates the resource and registers its deletion via t.Cleanup, so the resource is removed even when the test fails partway through and never reaches its trailing teardown steps — important because the tests share one cluster.

Deletions that are themselves assertions (e.g. "deleting the OBC must not delete the user") do not belong here; keep those as ordered subtests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireNamespace

func RequireNamespace(t *testing.T, k8sh *utils.K8sHelper, ns *corev1.Namespace)

RequireNamespace creates ns and registers its deletion via t.Cleanup. Deletion is issued without waiting for it to complete; namespace teardown is asynchronous and nothing in these tests depends on it finishing.

func RequireStorageClass

func RequireStorageClass(t *testing.T, k8sh *utils.K8sHelper, sc *storagev1.StorageClass)

RequireStorageClass creates sc and registers its deletion via t.Cleanup.

func StorageClass

func StorageClass(name string, objectStore *cephv1.CephObjectStore) *storagev1.StorageClass

StorageClass returns a StorageClass for the lib-bucket-provisioner bucket provisioner backed by objectStore, for use by ObjectBucketClaims.

Types

This section is empty.

Jump to

Keyboard shortcuts

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