diff --git a/go.mod b/go.mod index fed98ecf7c..070c479115 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/eclipse/paho.mqtt.golang v1.4.2 github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.25 github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3 - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14 + github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.15 github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9 github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7 github.com/fxamacker/cbor/v2 v2.4.0 diff --git a/go.sum b/go.sum index ba8ee0e224..b1762bf7f0 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.25 h1:PkmFk6qTwc4WHxAwRBY github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.25/go.mod h1:iv/czxi4ciFWMgrO+3nnanGfkT2X1QW5L3iCb+deewk= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3 h1:0Ew4PzLSFJ+sb7AYtvb9m1mRN45Sh0ELU1HdMCel5t8= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3/go.mod h1:ESOWI4GokQfQ3Bn2hGsdfOVx5idj7QEdCPT/SAQDd9M= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14 h1:o7CFEIyKn/quin5lrAlUbUu9x1dnecK0tZs5waLhdCc= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.15 h1:0fPmT+Jm2scrs9iQLX9dNTAaCPXn6fiTCwiYhcTc0fc= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.15/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9 h1:CUUieXQ8roD4M770GXj1he707V3V9Jiygk302+dwvKk= github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9/go.mod h1:iKBxmZkc7jdOrT99+IR1nyg7PlRgooAQMhZxDh2mTUQ= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 h1:QgZF9f70Cwpvkjw3tP1aiVGHc+yNFJNzW6hO8pDs3fg= diff --git a/internal/pkg/application/secret.go b/internal/pkg/application/secret.go index 3ed0b1ef91..ed2a6ba9b5 100644 --- a/internal/pkg/application/secret.go +++ b/internal/pkg/application/secret.go @@ -35,7 +35,7 @@ func prepareSecret(request common.SecretRequest) (string, map[string]string) { secretsKV[secret.Key] = secret.Value } - path := strings.TrimSpace(request.Path) + path := strings.TrimSpace(request.SecretName) return path, secretsKV } diff --git a/internal/pkg/controller/http/secret_test.go b/internal/pkg/controller/http/secret_test.go index 27fe5e2d84..4e8b744a8f 100644 --- a/internal/pkg/controller/http/secret_test.go +++ b/internal/pkg/controller/http/secret_test.go @@ -42,7 +42,7 @@ func TestAddSecret(t *testing.T) { ) NoPath := validRequest - NoPath.Path = "" + NoPath.SecretName = "" validNoRequestId := validRequest validNoRequestId.RequestId = "" badRequestId := validRequest @@ -59,7 +59,7 @@ func TestAddSecret(t *testing.T) { } mockProvider := &mocks.SecretProvider{} - mockProvider.On("StoreSecret", validRequest.Path, map[string]string{"password": "password", "username": "username"}).Return(nil) + mockProvider.On("StoreSecret", validRequest.SecretName, map[string]string{"password": "password", "username": "username"}).Return(nil) dic.Update(di.ServiceConstructorMap{ container.SecretProviderName: func(get di.Get) interface{} { return mockProvider