Skip to content

Commit

Permalink
Merge pull request #4364 from marcpfuller/mod-core-contracts-15
Browse files Browse the repository at this point in the history
build(deps)!: Upgrade contracts mod to update /secret DTO
  • Loading branch information
cloudxxx8 authored Feb 17, 2023
2 parents 82043fa + e482291 commit 8bb7416
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/application/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions internal/pkg/controller/http/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestAddSecret(t *testing.T) {
)

NoPath := validRequest
NoPath.Path = ""
NoPath.SecretName = ""
validNoRequestId := validRequest
validNoRequestId.RequestId = ""
badRequestId := validRequest
Expand All @@ -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
Expand Down

0 comments on commit 8bb7416

Please sign in to comment.