Skip to content

Commit

Permalink
build: Consume latest go-mod-bootstrap with RemoveHosts flag (#1510)
Browse files Browse the repository at this point in the history
* build: Consume latest go-mod-bootstrap with RemoveHosts flag

Signed-off-by: Leonard Goodell <leonard.goodell@intel.com>
  • Loading branch information
Lenny Goodell authored Sep 12, 2023
1 parent 8e06685 commit fda9b37
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ go 1.20

require (
github.com/OneOfOne/xxhash v1.2.8
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.30
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.32
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.1.0-dev.9
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.18
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.20
github.com/google/uuid v1.3.1
github.com/hashicorp/go-multierror v1.1.1
github.com/labstack/echo/v4 v4.11.1
Expand Down Expand Up @@ -65,13 +65,13 @@ require (
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/errs v1.3.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik=
github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.30 h1:Jwo0lKEXSkecS8Wx3FPPfTJIXL/oSzqp4TtF1tfQKP0=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.30/go.mod h1:IWnKywtO9mnO1xd5zZZZUKonDKJ0+VtUnarBuDdbspA=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.32 h1:UhWAi2oyRa8alqOXPyFWdMOcG0pCUoIVNMkOgP5xRQE=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.1.0-dev.32/go.mod h1:eC4dNTeMuXJ9h+i4F4Mqj464U0UCmLXWMh6rsHAPPHg=
github.com/edgexfoundry/go-mod-configuration/v3 v3.1.0-dev.5 h1:wTs2qOG/RHeizCHcPp8KOQcSzGrvNOhVQnK+JdAHJNs=
github.com/edgexfoundry/go-mod-configuration/v3 v3.1.0-dev.5/go.mod h1:mZyBGQ7eX+K63b46/K/OdiWSHtYbl/TK2GTfc0eOM6Q=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.1.0-dev.9 h1:ZvCeuB1CXzNzg2WhpLCEKhkPSZpS0Geoh0AqTbj08X4=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.1.0-dev.9/go.mod h1:L7i97+A+bMpvXFo1M6t0WHeRrsSocTgDEl3ayfVxCmo=
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.18 h1:t9K53MlZzsgjv4yhm8Ch+/eQ0I33SuiO1PBMKyTF2e8=
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.18/go.mod h1:i7ODgWktUeLEYxJdceAW0rjVfF9vRiTvzucKRN7MQVU=
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.20 h1:iKhaDrfN0plO95MjPmrOEhfiUrE9gMD9Os7odtOrM10=
github.com/edgexfoundry/go-mod-messaging/v3 v3.1.0-dev.20/go.mod h1:cD3WRffguDrR/G7dIyzYewfoOk44VlJfGSkgbuUzvYM=
github.com/edgexfoundry/go-mod-registry/v3 v3.1.0-dev.5 h1:Xu1Jxk8gjMGMROqOf2C5pLY6lx1nWNYSDife2d623UE=
github.com/edgexfoundry/go-mod-registry/v3 v3.1.0-dev.5/go.mod h1:4kYwOIuu5SPx5g9ayQXSSpE3m4aEB58x0iXS+m6MnzA=
github.com/edgexfoundry/go-mod-secrets/v3 v3.1.0-dev.6 h1:1mmrSNG7bsOhlSqC1F9L6eZwCirDPzzreivPOkp06i4=
Expand Down Expand Up @@ -188,8 +188,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.4.1 h1:Y35W1dgbbz2SQUYDPCaclXcuqleVmpbRa7646Jf2EX4=
github.com/nats-io/nats-server/v2 v2.9.21 h1:2TBTh0UDE74eNXQmV4HofsmRSCiVN0TH2Wgrp6BD6fk=
github.com/nats-io/jwt/v2 v2.5.0 h1:WQQ40AAlqqfx+f6ku+i0pOVm+ASirD4fUh+oQsiE9Ak=
github.com/nats-io/nats-server/v2 v2.9.22 h1:rzl88pqWFFrU4G00ed+JnY+uGHSLZ+3jrxDnJxzKwGA=
github.com/nats-io/nats.go v1.28.0 h1:Th4G6zdsz2d0OqXdfzKLClo6bOfoI/b1kInhRtFIy5c=
github.com/nats-io/nats.go v1.28.0/go.mod h1:XpbWUlOElGwTYbMR7imivs7jJj9GtK7ypv321Wp6pjc=
github.com/nats-io/nkeys v0.4.4 h1:xvBJ8d69TznjcQl9t6//Q5xXuVhyYiSos6RPtvQNTwA=
Expand Down Expand Up @@ -262,8 +262,8 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug=
golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
Expand Down Expand Up @@ -311,15 +311,15 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
25 changes: 13 additions & 12 deletions internal/common/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,17 @@ func TestAddReadingTags(t *testing.T) {

tests := []struct {
Name string
Reading dtos.BaseReading
Reading *dtos.BaseReading
ExpectedTags dtos.Tags
}{
{"Happy Path", readingWithTags, dtos.Tags{TestResourceTagName: TestResourceTagValue}},
{"No Tags", readingWithoutTags, nil},
{"Resource Not Found", readingResourceNotFound, nil},
{"Happy Path", &readingWithTags, dtos.Tags{TestResourceTagName: TestResourceTagValue}},
{"No Tags", &readingWithoutTags, nil},
{"Resource Not Found", &readingResourceNotFound, nil},
}

for _, test := range tests {
t.Run(test.Name, func(t *testing.T) {
AddReadingTags(&test.Reading)
AddReadingTags(test.Reading)
if test.ExpectedTags != nil {
require.NotEmpty(t, test.Reading.Tags)
assert.Equal(t, test.ExpectedTags, test.Reading.Tags)
Expand Down Expand Up @@ -319,26 +319,27 @@ func TestAddEventTags(t *testing.T) {

for _, test := range tests {
t.Run(test.Name, func(t *testing.T) {
AddEventTags(&test.Event)
event := test.Event
AddEventTags(&event)
if test.ExpectToHaveDeviceTags && test.ExpectToHaveCommandTags {
expectedCommandTags[TestDuplicateTagName] = TestDeviceTagValue
} else {
expectedCommandTags[TestDuplicateTagName] = TestCommandTagValue
}
if !test.ExpectToHaveDeviceTags && !test.ExpectToHaveCommandTags {
require.Empty(t, test.Event.Tags)
require.Empty(t, event.Tags)
} else {
require.NotEmpty(t, test.Event.Tags)
require.NotEmpty(t, event.Tags)
}
if test.ExpectToHaveDeviceTags {
assert.Subset(t, test.Event.Tags, expectedDeviceTags)
assert.Subset(t, event.Tags, expectedDeviceTags)
} else {
assert.NotSubset(t, test.Event.Tags, expectedDeviceTags)
assert.NotSubset(t, event.Tags, expectedDeviceTags)
}
if test.ExpectToHaveCommandTags {
assert.Subset(t, test.Event.Tags, expectedCommandTags)
assert.Subset(t, event.Tags, expectedCommandTags)
} else {
assert.NotSubset(t, test.Event.Tags, expectedCommandTags)
assert.NotSubset(t, event.Tags, expectedCommandTags)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (s *deviceService) Run() error {
httpServer.BootstrapHandler,
newMessageBusBootstrap(s.baseServiceName).messageBusBootstrapHandler,
handlers.NewServiceMetrics(s.serviceKey).BootstrapHandler, // Must be after Messaging
handlers.NewClientsBootstrap(s.flags.InDevMode()).BootstrapHandler,
handlers.NewClientsBootstrap().BootstrapHandler,
autoevent.BootstrapHandler,
NewBootstrap(s, router).BootstrapHandler,
autodiscovery.BootstrapHandler,
Expand Down

0 comments on commit fda9b37

Please sign in to comment.