Skip to content

Commit

Permalink
refactor: Updated go.mod for tagged go-mod-secrets and fixed unittest
Browse files Browse the repository at this point in the history
Signed-off-by: lenny <[email protected]>
  • Loading branch information
lenny committed Feb 19, 2021
1 parent d2e6caa commit 05db8a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion bootstrap/handlers/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ import (
"github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup"
bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config"
"github.com/edgexfoundry/go-mod-bootstrap/v2/di"

"github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger"
"github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader/mocks"
"github.com/edgexfoundry/go-mod-secrets/v2/pkg/types"
"github.com/edgexfoundry/go-mod-secrets/v2/secrets"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -62,7 +65,7 @@ func TestProvider_BootstrapHandler(t *testing.T) {

dic := di.NewContainer(di.ServiceConstructorMap{
container.LoggingClientInterfaceName: func(get di.Get) interface{} {
return logger.MockLogger{}
return logger.NewMockClient()
},
container.ConfigurationInterfaceName: func(get di.Get) interface{} {
return TestConfig{}
Expand Down Expand Up @@ -124,6 +127,7 @@ type TestConfig struct {
func NewTestConfig(port int) TestConfig {
return TestConfig{
SecretStore: bootstrapConfig.SecretStoreInfo{
Type: secrets.Vault,
Host: "localhost",
Port: port,
Protocol: "http",
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ module github.com/edgexfoundry/go-mod-bootstrap/v2
require (
github.com/BurntSushi/toml v0.3.1
github.com/edgexfoundry/go-mod-configuration/v2 v2.0.0-dev.3
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.0.0-dev.33
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.0.0-dev.34
github.com/edgexfoundry/go-mod-registry/v2 v2.0.0-dev.3
github.com/edgexfoundry/go-mod-secrets/v2 v2.0.0-dev.5
github.com/edgexfoundry/go-mod-secrets/v2 v2.0.0-dev.7
github.com/gorilla/mux v1.7.1
github.com/pelletier/go-toml v1.2.0
github.com/stretchr/testify v1.7.0
)

replace github.com/edgexfoundry/go-mod-secrets/v2 => ../go-mod-secrets

go 1.15

0 comments on commit 05db8a1

Please sign in to comment.