INNER CODE UNIT · Go

TestControllers

syself/cluster-api-provider-hetzner · controllers/controllers_suite_test.go:72

func TestControllers(t *testing.T) {
	secretErrorRetryDelay = 1 * time.Millisecond
	RegisterFailHandler(Fail)
	RunSpecs(t, "Controller Suite")
}

type ControllerResetter struct {
	debug bool
	// reconcileGate ensures no Reconcile is running while mock clients are being replaced between tests.
	// Each Reconcile call holds it as a read lock (via ReconcileGate); test setup holds it as a write
	// lock. Because a write lock waits for all read lock holders to finish, mock setup can only proceed
	// once all in-flight reconciles from the previous test have completed.
	reconcileGate                         *sync.RWMutex
	baremetalSSHClientFactory             *mocks.SSHFactory
	HetznerClusterReconciler              *HetznerClusterReconciler
	HCloudMachineReconciler               *HCloudMachineReconciler
	HCloudMachineTemplateReconciler       *HCloudMachineTemplateReconciler
	HetznerBareMetalHostReconciler        *HetznerBareMetalHostReconciler

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…