From 615da949cb9a6ea7b98a99f5464a221505562b5f Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 26 Jul 2023 16:42:47 +0200 Subject: [PATCH] Use account-aware sdp-go version --- engine.go | 4 ++-- engine_test.go | 1 - go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engine.go b/engine.go index 2c8a8ac..f4f84e7 100644 --- a/engine.go +++ b/engine.go @@ -131,8 +131,8 @@ func (e *Engine) AddSources(sources ...Source) { // Connect Connects to NATS func (e *Engine) connect() error { // Try to connect to NATS - if no := e.NATSOptions; no != nil { - ec, err := e.NATSOptions.Connect() + if e.NATSOptions != nil { + ec, err := e.NATSOptions.ConnectAs("") // rely on the underlying API key's identity if err != nil { return err diff --git a/engine_test.go b/engine_test.go index 55e81f5..5831495 100644 --- a/engine_test.go +++ b/engine_test.go @@ -770,7 +770,6 @@ func GetTestOAuthTokenClient(t *testing.T) auth.TokenClient { ccc := auth.ClientCredentialsConfig{ ClientID: clientID, ClientSecret: clientSecret, - Account: "org_hdeUXbB55sMMvJLa", } return auth.NewOAuthTokenClient( diff --git a/go.mod b/go.mod index 0aec2c2..f5e4c4b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e github.com/nats-io/nats-server/v2 v2.9.20 github.com/nats-io/nats.go v1.28.0 - github.com/overmindtech/sdp-go v0.39.3 + github.com/overmindtech/sdp-go v0.41.0 github.com/overmindtech/sdpcache v1.5.0 github.com/sirupsen/logrus v1.9.3 github.com/sourcegraph/conc v0.3.0 diff --git a/go.sum b/go.sum index ec532e2..7ed72b5 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/overmindtech/api-client v0.14.0 h1:zXyjJsIeawNqoWv7FqOjwcqgFpLrDYz7l9MWqh1G9ZQ= github.com/overmindtech/api-client v0.14.0/go.mod h1:msdkTAQFlvDGOU4tQk2adk2P8j23uaMWkJ9YRX4wGWI= -github.com/overmindtech/sdp-go v0.39.3 h1:P9D7pWPqqawoyjacYNZPWVxGVMkw9Ymi5XcX5yrqfcs= -github.com/overmindtech/sdp-go v0.39.3/go.mod h1:fwGtzDA7h//c+QBnOhRa7KQRt1RFFWMPnVndH+39GLs= +github.com/overmindtech/sdp-go v0.41.0 h1:eIBLblW2MDCCEk7ZSPk6sFo/1piMzba1+nUDa722vOo= +github.com/overmindtech/sdp-go v0.41.0/go.mod h1:fwGtzDA7h//c+QBnOhRa7KQRt1RFFWMPnVndH+39GLs= github.com/overmindtech/sdpcache v1.5.0 h1:QzHWQm1KGN9rNHPb/VZvz7WDCsyKOuVLlNUGF2CIFGc= github.com/overmindtech/sdpcache v1.5.0/go.mod h1:GFMMle860EWMDQXbk6dhLVSQrV0YlEqqJ6/VNxINb0o= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=