Documentation
¶
Overview ¶
Package test: this file contains minimum viable configurations for various objects in k8ssandra-operator to facilitate testing.
Index ¶
- func NewCassandraDatacenter(name string, namespace string) cassdcapi.CassandraDatacenter
- func NewFakeClient() (client.Client, error)
- func NewFakeClientWRestMapper() client.Client
- func NewK8ssandraCluster(name string, namespace string) k8ssandraapi.K8ssandraCluster
- func NewStargate(name string, namespace string) stargateapi.Stargate
- func TestSetup(t *testing.T) context.Context
- type ControllerTest
- type MultiClusterTestEnv
- type TestEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCassandraDatacenter ¶
func NewCassandraDatacenter(name string, namespace string) cassdcapi.CassandraDatacenter
func NewFakeClient ¶
NewFakeClient gets a fake client loaded up with a scheme that contains all the APIs used in this project.
func NewK8ssandraCluster ¶
func NewK8ssandraCluster(name string, namespace string) k8ssandraapi.K8ssandraCluster
NewK8ssandraCluster returns a minimum viable k8ssandra cluster.
func NewStargate ¶
func NewStargate(name string, namespace string) stargateapi.Stargate
Types ¶
type ControllerTest ¶
type MultiClusterTestEnv ¶
type MultiClusterTestEnv struct {
// Clients is a mapping of cluster (or k8s context) names to Client objects. Note that
// these are no-cache clients as they are intended for use by the tests.
Clients map[string]client.Client
// contains filtered or unexported fields
}
func (*MultiClusterTestEnv) ControllerTest ¶
func (e *MultiClusterTestEnv) ControllerTest(ctx context.Context, test ControllerTest) func(*testing.T)
func (*MultiClusterTestEnv) Start ¶
func (e *MultiClusterTestEnv) Start(ctx context.Context, t *testing.T, initReconcilers func(mgr manager.Manager, clientCache *clientcache.ClientCache, clusters []cluster.Cluster) error) error
func (*MultiClusterTestEnv) Stop ¶
func (e *MultiClusterTestEnv) Stop(t *testing.T)
Click to show internal directories.
Click to hide internal directories.