INNER CODE UNIT · Go

func

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

func (r *ControllerResetter) ResetAndInitNamespace(namespace string, testEnv *helpers.TestEnvironment, t FullGinkgoTInterface) func() {
	// Acquire the write lock. This blocks until all in-flight Reconcile calls (which hold
	// the read lock) finish, so no reconcile from the previous test is running when we
	// swap the mock clients. The returned func releases it once all On() expectations
	// have been registered by the caller's BeforeEach (via defer).
	r.reconcileGate.Lock()

	rescueSSHClient := &sshmock.Client{}
	// Register Testify helpers so failed expectations are reported against this test instance.
	rescueSSHClient.Test(t)

	osSSHClientAfterInstallImage := &sshmock.Client{}
	osSSHClientAfterInstallImage.Test(t)

	osSSHClientAfterCloudInit := &sshmock.Client{}
	osSSHClientAfterCloudInit.Test(t)

	robotClient := &robotmock.Client{}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…