testutils

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scheme = runtime.NewScheme()

Scheme for test only.

Functions

func DeepEqual

func DeepEqual[T any](x, y T) bool

DeepEqual returns true when the two objects are semantically equal.

func FakeRisingWave

func FakeRisingWave() *risingwavev1alpha1.RisingWave

FakeRisingWave returns a new fake Risingwave.

func FakeRisingWaveOpenKruiseDisabled added in v0.2.4

func FakeRisingWaveOpenKruiseDisabled() *risingwavev1alpha1.RisingWave

FakeRisingWaveOpenKruiseDisabled returns a new fake RisingWave with OpenKruise disabled.

func FakeRisingWaveOpenKruiseEnabled added in v0.2.4

func FakeRisingWaveOpenKruiseEnabled() *risingwavev1alpha1.RisingWave

FakeRisingWaveOpenKruiseEnabled returns a new fake RisingWave with OpenKruise enabled.

func FakeRisingWaveWithMutate added in v0.2.2

func FakeRisingWaveWithMutate(mutate func(wave *risingwavev1alpha1.RisingWave)) *risingwavev1alpha1.RisingWave

FakeRisingWaveWithMutate creates a new fake RisingWave and applies the mutate function. It's for test purposes.

func GetNodeGroupName added in v0.4.0

func GetNodeGroupName(i int) string

GetNodeGroupName returns the group name for a specified index.

func JSONMustPrettyPrint added in v0.2.5

func JSONMustPrettyPrint(x any) string

JSONMustPrettyPrint serializes the given object into JSON string. It will panic with error if serialization fails.

func NewFakeRisingWaveScaleViewFor added in v0.2.2

func NewFakeRisingWaveScaleViewFor(risingwave *risingwavev1alpha1.RisingWave, component string, mutates ...func(*risingwavev1alpha1.RisingWave, *risingwavev1alpha1.RisingWaveScaleView)) *risingwavev1alpha1.RisingWaveScaleView

NewFakeRisingWaveScaleViewFor creates a new fake RisingWaveScaleView object for the target RisingWave and component. It applies the given mutations before returning.

Types

This section is empty.

Jump to

Keyboard shortcuts

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