etcdopstask

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEtcdOpsTaskDeletedAfterTTL

func AssertEtcdOpsTaskDeletedAfterTTL(ctx context.Context, g *WithT, t *testing.T, cl client.Client, etcdOpsTask *druidv1alpha1.EtcdOpsTask, expectedFinalPhase druidapicommon.LastOperationType)

assertEtcdOpsTaskDeletedAfterTTL waits for the EtcdOpsTask to be deleted after TTL expires for tasks that reached the specified phase.

func AssertEtcdOpsTaskStateAndErrorCode

func AssertEtcdOpsTaskStateAndErrorCode(ctx context.Context, g *WithT, t *testing.T, cl client.Client, etcdOpsTask *druidv1alpha1.EtcdOpsTask, expectedTaskState druidv1alpha1.TaskState, expectedPhase druidapicommon.LastOperationType, expectedOperationState druidapicommon.LastOperationState, expectedErrorCode *druidapicommon.ErrorCode)

assertEtcdOpsTaskStateAndErrorCode waits for the EtcdOpsTask to reach the specified state with the expected error code (or nil for success) in the given phase.

func DeployReadyEtcd

func DeployReadyEtcd(ctx context.Context, g *WithT, t *testing.T, cl client.Client, namespace string) *druidv1alpha1.Etcd

deployReadyEtcd creates an etcd instance and sets it to ready status

Types

type ReconcilerTestEnv

type ReconcilerTestEnv struct {
	ItTestEnv  setup.DruidTestEnvironment
	Reconciler *etcdopstask.Reconciler
}

ReconcilerTestEnv encapsulates the test environment required to test the EtcdOpsTask reconciler.

func InitializeEtcdOpsTaskReconcilerTestEnv

func InitializeEtcdOpsTaskReconcilerTestEnv(t *testing.T, itTestEnv setup.DruidTestEnvironment, clientBuilder *testutils.TestClientBuilder) ReconcilerTestEnv

initializeEtcdOpsTaskReconcilerTestEnv sets up the test environment

func (*ReconcilerTestEnv) InjectHTTPClient

func (env *ReconcilerTestEnv) InjectHTTPClient(httpClient *http.Client)

InjectHTTPClient injects an HTTP client into the reconciler's task handler registry for testing.

Jump to

Keyboard shortcuts

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