From 8cadf2a29a15022559f7ff12f35b88ed9e7ba71a Mon Sep 17 00:00:00 2001 From: Nick Cellino Date: Tue, 6 Feb 2024 15:06:09 -0500 Subject: [PATCH] Remove unnecessary config from TestAgent_scadaProvider Since the Scada provider is now started on agent startup regardless of whether a cloud config is provided, this removes the cloud config override from the relevant test. This change is not exactly related to the changes from this PR, but rather is something small and sort of related that was noticed while working on this PR. --- agent/agent_test.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/agent/agent_test.go b/agent/agent_test.go index c70eb15338..2cf0c2f4cc 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -32,10 +32,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/google/tcpproxy" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/hcp-scada-provider/capability" - "github.com/hashicorp/serf/coordinate" - "github.com/hashicorp/serf/serf" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" @@ -44,6 +40,11 @@ import ( "google.golang.org/protobuf/encoding/protojson" "gopkg.in/square/go-jose.v2/jwt" + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/hcp-scada-provider/capability" + "github.com/hashicorp/serf/coordinate" + "github.com/hashicorp/serf/serf" + "github.com/hashicorp/consul/agent/cache" cachetype "github.com/hashicorp/consul/agent/cache-types" "github.com/hashicorp/consul/agent/checks" @@ -6343,12 +6344,6 @@ func TestAgent_scadaProvider(t *testing.T) { OverrideDeps: func(deps *BaseDeps) { deps.HCP.Provider = pvd }, - Overrides: ` -cloud { - resource_id = "organization/0b9de9a3-8403-4ca6-aba8-fca752f42100/project/0b9de9a3-8403-4ca6-aba8-fca752f42100/consul.cluster/0b9de9a3-8403-4ca6-aba8-fca752f42100" - client_id = "test" - client_secret = "test" -}`, } defer a.Shutdown() require.NoError(t, a.Start(t))