You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: manager_test.go
    path of file: ./repos/consul-template/manager
    
    the code of the file until where you have to start completion: // Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package manager

import (
	"fmt"
	"io"
	"log"
	"os"
	"testing"

	"github.com/hashicorp/consul-template/config"
	dep "github.com/hashicorp/consul-template/dependency"
	"github.com/
    
func TestMain(m *testing.M) {
	log.SetOutput(io.Discard)
	tb := &test.TestingTB{}
	consul, err := testutil.NewTestServerConfigT(tb,
		func(c *testutil.TestServerConfig) {
			c.LogLevel = "warn"
			c.Stdout = io.Discard
			c.Stderr = io.Discard
		})
	if err != nil {
		log.Fatal(fmt.Errorf("failed to start consul server: %v", err))
	}
	testConsul = consul

	consulConfig := config.DefaultConsulConfig()
	consulConfig.Address = &testConsul.HTTPAddr
	clients, err := NewClientSet(&config.Config{
		Consul: consulConfig,
		Vault:  config.DefaultVaultConfig(),
		Nomad:  config.DefaultNomadConfig(),
	})
	if err != nil {
		testConsul.Stop()
		log.Fatal(fmt.Errorf("failed to start clients: %v", err))
	}
	testClients = clients

	exitCh := make(chan int, 1)
	func() {
		defer func() {
			// Attempt to recover from a panic and stop the server. If we don't stop
			// it, the panic will cause the server to remain running in the
			// background. Here we catch the panic and the re-raise it.
			if r := recover(); r != nil {
				testConsul.Stop()
				panic(r)
			}
		}()

		exitCh <- m.Run()
	}()

	exit := <-exitCh

	tb.DoCleanup()
	testConsul.Stop()
	os.Exit(exit)
}