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: nomad_test.go
    path of file: ./repos/traefik/pkg/provider/nomad
    
    the code of the file until where you have to start completion: package nomad

import (
	"context"
	"net/http"
	"net/http/httptest"
	"strings"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/traefik/traefik/v3/pkg/types"
)

func Test_globalConfig(t *testing.T) {
	cases := []struct {
		Name             string
		Prefix           string
		Tags             []string
		ExposedByDefault bool
		exp              configuration
	}{
		{
			Name:             "expose_
    
func TestProvider_SetDefaults_Endpoint(t *testing.T) {
	testCases := []struct {
		desc     string
		envs     map[string]string
		expected *EndpointConfig
	}{
		{
			desc: "without env vars",
			envs: map[string]string{},
			expected: &EndpointConfig{
				Address: "http://127.0.0.1:4646",
			},
		},
		{
			desc: "with env vars",
			envs: map[string]string{
				"NOMAD_ADDR":        "https://nomad.example.com",
				"NOMAD_REGION":      "us-west",
				"NOMAD_TOKEN":       "almighty_token",
				"NOMAD_CACERT":      "/etc/ssl/private/nomad-agent-ca.pem",
				"NOMAD_CLIENT_CERT": "/etc/ssl/private/global-client-nomad.pem",
				"NOMAD_CLIENT_KEY":  "/etc/ssl/private/global-client-nomad-key.pem",
				"NOMAD_SKIP_VERIFY": "true",
			},
			expected: &EndpointConfig{
				Address: "https://nomad.example.com",
				Region:  "us-west",
				Token:   "almighty_token",
				TLS: &types.ClientTLS{
					CA:                 "/etc/ssl/private/nomad-agent-ca.pem",
					Cert:               "/etc/ssl/private/global-client-nomad.pem",
					Key:                "/etc/ssl/private/global-client-nomad-key.pem",
					InsecureSkipVerify: true,
				},
				EndpointWaitTime: 0,
			},
		},
	}

	for _, test := range testCases {
		test := test
		t.Run(test.desc, func(t *testing.T) {
			for k, v := range test.envs {
				t.Setenv(k, v)
			}

			p := &Provider{}
			p.SetDefaults()

			assert.Equal(t, test.expected, p.Endpoint)
		})
	}
}