INNER CODE UNIT · Go

newTestDeployment

kimdre/doco-cd · cmd/doco-cd/controlplane_test_helpers_test.go:68

func newTestDeployment(t *testing.T, appConfig *app.Config, dataMountPoint container.MountPoint, reconciliationDeps reconciliation.Dependencies) *controlplane.Deployment {
	t.Helper()

	if reconciliationDeps.Contexts == nil {
		reconciliationDeps.Contexts = docker.NewContextRegistry(reconciliationDeps.DockerCLI, docker.ContextRegistryOptions{
			Quiet:         true,
			SwarmFeatures: true,
		})

		t.Cleanup(func() { _ = reconciliationDeps.Contexts.Close() })
	}

	manager := newTestReconciliationManager(t, reconciliationDeps)

	preparer, err := source.NewPreparer(source.Dependencies{AppConfig: appConfig})
	if err != nil {
		t.Fatalf("failed to create source preparer: %v", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…