Versions in this module Expand all Collapse all v1 v1.0.0 Feb 17, 2026 Changes in this version + func AssertEventuallyEqual(t *testing.T, ctx context.Context, expectedFunc func() interface{}, ...) + func AssertEventuallyTrue(t *testing.T, ctx context.Context, conditionFunc func() bool, ...) + func AssertResourceExists(t *testing.T, ctx context.Context, c client.Client, key types.NamespacedName, ...) + func AssertResourceNotFound(t *testing.T, ctx context.Context, c client.Client, key types.NamespacedName, ...) + func CleanupNamespace(t *testing.T, ctx context.Context, c client.Client, name string) + func CleanupResource(t *testing.T, ctx context.Context, c client.Client, obj client.Object) + func CreateAndWait(ctx context.Context, t *testing.T, c client.Client, obj client.Object, ...) error + func CreateNamespace(t *testing.T, ctx context.Context, c client.Client, name string) error + func DeleteAndWait(ctx context.Context, t *testing.T, c client.Client, obj client.Object, ...) error + func GenerateUniqueName(prefix string) string + func GetCRDBasePath() (string, error) + func LogResourceStatus(t *testing.T, resourceType, name string, status interface{}) + func RetryOnConflict(ctx context.Context, fn func() error) error + func UpdateAndWait(ctx context.Context, t *testing.T, c client.Client, obj client.Object, ...) error + func WaitForCondition(ctx context.Context, conditionFunc func() (bool, error), timeout time.Duration) error + func WaitForResourceToBeDeleted(ctx context.Context, c client.Client, key types.NamespacedName, ...) error + func WaitForResourceToExist(ctx context.Context, c client.Client, key types.NamespacedName, ...) error + type ArgoCDMockServer struct + func NewArgoCDMockServer() *ArgoCDMockServer + func (m *ArgoCDMockServer) AddApplication(app *MockApplication) + func (m *ArgoCDMockServer) Close() + func (m *ArgoCDMockServer) GetApplication(name string) (*MockApplication, bool) + func (m *ArgoCDMockServer) SetHealthy(healthy bool) + func (m *ArgoCDMockServer) URL() string + func (m *ArgoCDMockServer) UpdateApplicationHealth(name, healthStatus, message string) + func (m *ArgoCDMockServer) UpdateApplicationSync(name, syncStatus, revision string) + type Fixtures struct + func NewFixtures() *Fixtures + func (f *Fixtures) DriftMonitorWithCondition(namespace, name, trackerName string, ...) *cdv1alpha1.DriftMonitor + func (f *Fixtures) DriftMonitorWithSync(namespace, name, trackerName string, synced bool, ...) *cdv1alpha1.DriftMonitor + func (f *Fixtures) NewCDOperatorConfig(name string) *cdv1alpha1.CDOperatorConfig + func (f *Fixtures) NewClusterConfig(name, argoCDURL string) *cdv1alpha1.ClusterConfig + func (f *Fixtures) NewDriftMonitor(namespace, name, trackerName string) *cdv1alpha1.DriftMonitor + func (f *Fixtures) NewGitHubTokenSecret(namespace string) *corev1.Secret + func (f *Fixtures) NewNamespace(name string) *corev1.Namespace + func (f *Fixtures) NewPromotionPolicy(namespace, name string) *cdv1alpha1.PromotionPolicy + func (f *Fixtures) NewPullRequestTracker(namespace, name string, prNumber int) *cdv1alpha1.PullRequestTracker + func (f *Fixtures) NewSecret(namespace, name string, data map[string][]byte) *corev1.Secret + func (f *Fixtures) NewWebhookSecret(namespace string) *corev1.Secret + func (f *Fixtures) PRTrackerWithCondition(namespace, name string, prNumber int, ...) *cdv1alpha1.PullRequestTracker + func (f *Fixtures) PRTrackerWithState(namespace, name string, prNumber int, state string) *cdv1alpha1.PullRequestTracker + type GitHubMockServer struct + func NewGitHubMockServer() *GitHubMockServer + func (m *GitHubMockServer) AddPR(pr *MockPullRequest) + func (m *GitHubMockServer) AddReview(prNumber int, review MockReview) + func (m *GitHubMockServer) AddStatus(sha string, status MockStatus) + func (m *GitHubMockServer) Close() + func (m *GitHubMockServer) GetLabels(prNumber int) []string + func (m *GitHubMockServer) GetPR(prNumber int) (*MockPullRequest, bool) + func (m *GitHubMockServer) URL() string + type MockApplication struct + Name string + Namespace string + Spec MockApplicationSpec + Status MockApplicationStatus + func NewMockApplicationOutOfSync(name, namespace, currentRevision, targetRevision string) *MockApplication + func NewMockApplicationSynced(name, namespace, revision string) *MockApplication + type MockApplicationDestination struct + Namespace string + Server string + type MockApplicationSource struct + Path string + RepoURL string + TargetRevision string + type MockApplicationSpec struct + Destination MockApplicationDestination + Source MockApplicationSource + type MockApplicationStatus struct + Health MockHealthStatus + Sync MockSyncStatus + type MockHealthStatus struct + Message string + Status string + type MockPullRequest struct + BaseBranch string + CreatedAt time.Time + HeadSHA string + Labels []string + Mergeable bool + Number int + State string + Title string + UpdatedAt time.Time + type MockReview struct + Body string + ID int64 + State string + SubmittedAt time.Time + User string + type MockStatus struct + Context string + CreatedAt time.Time + Description string + State string + TargetURL string + UpdatedAt time.Time + type MockSyncStatus struct + Revision string + Status string + SyncedAt time.Time + type TestCluster struct + func NewTestCluster(t *testing.T, opts TestClusterOptions) *TestCluster + func (tc *TestCluster) Client() client.Client + func (tc *TestCluster) Config() *rest.Config + func (tc *TestCluster) Context() context.Context + func (tc *TestCluster) Teardown() + type TestClusterOptions struct + AttachControlPlaneOutput bool + CRDDirectoryPaths []string + Timeout time.Duration