mirror of https://github.com/status-im/consul.git
Merge pull request #7324 from alrs/prune-agent-test-functions
agent: Prune Unused Test Helper Functions
This commit is contained in:
commit
50a2883b1f
|
@ -36,7 +36,6 @@ import (
|
||||||
tokenStore "github.com/hashicorp/consul/agent/token"
|
tokenStore "github.com/hashicorp/consul/agent/token"
|
||||||
"github.com/hashicorp/consul/agent/xds/proxysupport"
|
"github.com/hashicorp/consul/agent/xds/proxysupport"
|
||||||
"github.com/hashicorp/consul/api"
|
"github.com/hashicorp/consul/api"
|
||||||
"github.com/hashicorp/consul/lib"
|
|
||||||
"github.com/hashicorp/consul/sdk/testutil"
|
"github.com/hashicorp/consul/sdk/testutil"
|
||||||
"github.com/hashicorp/consul/sdk/testutil/retry"
|
"github.com/hashicorp/consul/sdk/testutil/retry"
|
||||||
"github.com/hashicorp/consul/testrpc"
|
"github.com/hashicorp/consul/testrpc"
|
||||||
|
@ -3157,11 +3156,11 @@ func TestAgent_RegisterService_TranslateKeys(t *testing.T) {
|
||||||
|
|
||||||
t.Run("normal", func(t *testing.T) {
|
t.Run("normal", func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
testAgent_RegisterService_ACLDeny(t, "enable_central_service_config = false")
|
testAgent_RegisterService_TranslateKeys(t, "enable_central_service_config = false")
|
||||||
})
|
})
|
||||||
t.Run("service manager", func(t *testing.T) {
|
t.Run("service manager", func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
testAgent_RegisterService_ACLDeny(t, "enable_central_service_config = true")
|
testAgent_RegisterService_TranslateKeys(t, "enable_central_service_config = true")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3330,6 +3329,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) {
|
||||||
"some": "meta",
|
"some": "meta",
|
||||||
"enable_tag_override": "sidecar_service.meta is 'opaque' so should not get translated",
|
"enable_tag_override": "sidecar_service.meta is 'opaque' so should not get translated",
|
||||||
},
|
},
|
||||||
|
TaggedAddresses: map[string]structs.ServiceAddress{},
|
||||||
Port: 8001,
|
Port: 8001,
|
||||||
EnableTagOverride: true,
|
EnableTagOverride: true,
|
||||||
Weights: &structs.Weights{Passing: 1, Warning: 1},
|
Weights: &structs.Weights{Passing: 1, Warning: 1},
|
||||||
|
@ -6138,13 +6138,6 @@ func requireLeafValidUnderCA(t *testing.T, issued *structs.IssuedCert, ca *struc
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeTelemetryDefaults(targetID string) lib.TelemetryConfig {
|
|
||||||
return lib.TelemetryConfig{
|
|
||||||
FilterDefault: true,
|
|
||||||
MetricsPrefix: "consul.proxy." + targetID,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAgentConnectAuthorize_badBody(t *testing.T) {
|
func TestAgentConnectAuthorize_badBody(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("too slow for testing.Short")
|
t.Skip("too slow for testing.Short")
|
||||||
|
|
Loading…
Reference in New Issue