integration

package
v1.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPVNodeAffinity

func WithPVNodeAffinity(matchExpressions []corev1.NodeSelectorRequirement) func(pv *corev1.PersistentVolume)

func WithPodCondition

func WithPodCondition(condition corev1.PodCondition) func(pod *corev1.Pod)

func WithPollRetryInterval

func WithPollRetryInterval(interval time.Duration) func(*option)

func WithPollTimeout

func WithPollTimeout(timeout time.Duration) func(*option)

Types

type Client

type Client struct {
	RetryInterval time.Duration
	Timeout       time.Duration
	client.Client
}

func (*Client) Refresh

func (c *Client) Refresh(ctx context.Context, obj client.Object) error

func (*Client) UpdateScyllaCluster

func (c *Client) UpdateScyllaCluster(ctx context.Context, cluster *scyllav1.ScyllaCluster, opts ...client.UpdateOption) error

type EnvOption

type EnvOption func(*option)

type PVOption

type PVOption func(pv *corev1.PersistentVolume)

type PodOption

type PodOption func(pod *corev1.Pod)

type ScyllaFake

type ScyllaFake struct {
	// contains filtered or unexported fields
}

func NewScyllaFake

func NewScyllaFake(operationalMode scyllaclient.OperationalMode, keyspaces []string) *ScyllaFake

func (*ScyllaFake) Close

func (s *ScyllaFake) Close()

func (*ScyllaFake) DrainRequests

func (s *ScyllaFake) DrainRequests() int

func (*ScyllaFake) KeyspaceSnapshots

func (s *ScyllaFake) KeyspaceSnapshots() []string

func (*ScyllaFake) SetOperationalMode

func (s *ScyllaFake) SetOperationalMode(mode scyllaclient.OperationalMode)

func (*ScyllaFake) Start

func (s *ScyllaFake) Start() string

type StatefulSetOperatorStub

type StatefulSetOperatorStub struct {
	// contains filtered or unexported fields
}

func NewStatefulSetOperatorStub

func NewStatefulSetOperatorStub(env *TestEnvironment) *StatefulSetOperatorStub

func (*StatefulSetOperatorStub) CreatePVCs

func (s *StatefulSetOperatorStub) CreatePVCs(ctx context.Context, cluster *scyllav1.ScyllaCluster, pvOptions ...PVOption) error

func (*StatefulSetOperatorStub) CreatePods

func (s *StatefulSetOperatorStub) CreatePods(ctx context.Context, cluster *scyllav1.ScyllaCluster, options ...PodOption) error

func (*StatefulSetOperatorStub) CreatePodsPartition

func (s *StatefulSetOperatorStub) CreatePodsPartition(ctx context.Context, cluster *scyllav1.ScyllaCluster, partition int, options ...PodOption) error

func (*StatefulSetOperatorStub) SyncPods added in v1.1.0

func (*StatefulSetOperatorStub) SyncStatus

func (s *StatefulSetOperatorStub) SyncStatus(ctx context.Context, cluster *scyllav1.ScyllaCluster) error

type TestEnvironment

type TestEnvironment struct {
	manager.Manager
	Client
	KubeClient kubernetes.Interface
	Config     *rest.Config
	// contains filtered or unexported fields
}

TestEnvironment encapsulates a Kubernetes local test environment.

func NewTestEnvironment

func NewTestEnvironment(logger log.Logger, options ...EnvOption) (*TestEnvironment, error)

NewTestEnvironment creates a new environment spinning up a local api-server.

func (*TestEnvironment) AssertRackScaled

func (t *TestEnvironment) AssertRackScaled(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster, replicas int32) error

func (*TestEnvironment) ClusterScaleSteps

func (t *TestEnvironment) ClusterScaleSteps(desiredNodeCount int32) []int32

func (*TestEnvironment) CreateNamespace

func (t *TestEnvironment) CreateNamespace(ctx context.Context, generateName string) (*corev1.Namespace, error)

func (*TestEnvironment) MultiRackCluster added in v1.1.0

func (t *TestEnvironment) MultiRackCluster(ns *corev1.Namespace, members ...int32) *scyllav1.ScyllaCluster

func (*TestEnvironment) RackMemberServices

func (t *TestEnvironment) RackMemberServices(ctx context.Context, namespace string, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) ([]corev1.Service, error)

func (*TestEnvironment) SingleRackCluster

func (t *TestEnvironment) SingleRackCluster(ns *corev1.Namespace) *scyllav1.ScyllaCluster

func (*TestEnvironment) StartManager

func (t *TestEnvironment) StartManager(ctx context.Context) error

func (*TestEnvironment) StatefulSetOfRack

func (t *TestEnvironment) StatefulSetOfRack(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) (*appsv1.StatefulSet, error)

func (*TestEnvironment) Stop

func (t *TestEnvironment) Stop() error

func (*TestEnvironment) WaitForCluster

func (t *TestEnvironment) WaitForCluster(ctx context.Context, cluster *scyllav1.ScyllaCluster) error

func (*TestEnvironment) WaitForWebhooks

func (t *TestEnvironment) WaitForWebhooks()

Jump to

Keyboard shortcuts

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