# Functions
AddReadyNode adds a new Node with status "Ready" and the given name and IP.
AddSomeReadyNodes create a number of new, ready Nodes.
ArgumentsMatchExpected returns a descriptive error if any of the expected arguments do not exist.
AssertLabelsContainRookRequirements asserts that the the labels under test contain the labels which all Rook pods should have.
GetEnv finds returns the env var with the given name from a list of env vars.
HumanReadableVolume returns a string representation of a Kubernetes volume which is more compact and human readable than the default string go prints.
HumanReadableVolumeMount returns a string representation of a Kubernetes volume mount which is more compact and human readable than the default string go prints.
HumanReadableVolumeMounts returns a string representation of a list of Kubernetes volume mounts which is more compact and human readable than the default string go prints.
HumanReadableVolumes returns a string representation of a list of Kubernetes volumes which is more compact and human readable than the default string go prints.
New creates a fake K8s cluster with some nodes added.
NewComplexClientset is a reusable clientset for Rook unit tests that adds some complex behavior to the clientset to mimic more of what K8s does in the real world.
NewPodSpecTester creates a new tester to test the given PodSpec.
NewPodTemplateSpecTester creates a new tester to test the given PodTemplateSpec.
PrependComplexJobReactor adds a Job reactor with the below behavior.
PrependFailReactor adds a reactor with the desired verb and resource that will report a failure.
SetFakeKubernetesVersion sets a fake K8s version on the clientset.
VolumeExists returns a descriptive error if the volume does not exist.
VolumeIsEmptyDir returns a descriptive error if the volume does not exist or is not an empty dir.
VolumeIsHostPath returns a descriptive error if the volume does not exist, is not a HostPath volume, or if the volume's path is not as expected.
VolumeMountExists returns returns a descriptive error if the volume mount does not exist.
# Structs
A ContainersTester is a helper exposing methods for testing required Rook specifications common for all Rook containers.
MountsSpec is a struct which includes a list of Kubernetes volume mounts as well as additional metadata about the volume mount list for better identification during tests.
A PodSpecTester is a helper exposing methods for testing required Ceph specifications common for all Ceph PodSpecs.
A PodTemplateSpecTester is a helper exposing methods for testing required Rook specifications common for all Rook PodTemplateSpecs.
ResourceLimitExpectations allows a test to define expectations for resource limits on containers.
VolumesAndMountsTestDefinition defines which volumes and mounts to test and what those values should be.
VolumesSpec is a struct which includes a list of Kubernetes volumes as well as additional metadata about the volume list for better identification during tests.