From a181c3dd4ddc736eedbca5bae19d62775c4e69b6 Mon Sep 17 00:00:00 2001 From: Leonard Goodell Date: Tue, 7 Feb 2023 09:07:46 -0700 Subject: [PATCH] feat: Updated to use tagged go mods Signed-off-by: Leonard Goodell --- app-service-template/go.mod | 9 +-- app-service-template/go.sum | 4 ++ go.mod | 9 +-- go.sum | 8 ++- internal/trigger/messagebus/messaging_test.go | 2 +- .../trigger/messagebus/mocks/MessageClient.go | 69 ------------------- 6 files changed, 15 insertions(+), 86 deletions(-) delete mode 100644 internal/trigger/messagebus/mocks/MessageClient.go diff --git a/app-service-template/go.mod b/app-service-template/go.mod index d8b7a8bfd..d10ff07d5 100644 --- a/app-service-template/go.mod +++ b/app-service-template/go.mod @@ -8,14 +8,9 @@ go 1.18 // comment out this replace statement and update the SDK version to latest replace github.com/edgexfoundry/app-functions-sdk-go/v3 => ../ -replace ( - github.com/edgexfoundry/go-mod-core-contracts/v3 => ../../MODS/go-mod-core-contracts - github.com/edgexfoundry/go-mod-messaging/v3 => ../../MODS/go-mod-messaging -) - require ( github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.9 - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.6 + github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9 github.com/google/uuid v1.3.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/stretchr/testify v1.8.1 @@ -30,7 +25,7 @@ require ( github.com/eclipse/paho.mqtt.golang v1.4.2 // indirect github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11 // indirect github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.2 // indirect - github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.4 // indirect + github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 // indirect github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 // indirect github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.5 // indirect github.com/fatih/color v1.9.0 // indirect diff --git a/app-service-template/go.sum b/app-service-template/go.sum index 4201d7a83..1f722a69c 100644 --- a/app-service-template/go.sum +++ b/app-service-template/go.sum @@ -32,6 +32,10 @@ github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11 h1:PHkcIC9hwOG2XyumsdO github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11/go.mod h1:UjrW9GZ5UjKZLF1EzEtAjvrgOvgQz3FGyVyAAX+fXW4= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.2 h1:xp5MsP+qf/fuJxy8fT7k1N+c4j4C6w04qMCBXm6id7o= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.2/go.mod h1:1Vv4uWAo6r7k6jUlqVJW8JOL6YKVBc6sRL8Al3DrMck= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9 h1:ejafyDHaVCdfKW4IQZeg4n1mBI2JkC1Y1XXelyyj+z8= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 h1:jgDQA/7SENURXQkIX11pNgA/pX9IK9ZULenj/vF17Vw= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7/go.mod h1:r6Klfz+QBDx1Z5UV0z70MKdK2/cgHwhtqTm2HFXoWug= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 h1:QgZF9f70Cwpvkjw3tP1aiVGHc+yNFJNzW6hO8pDs3fg= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3/go.mod h1:2w8v0sv+i21nY+DY6JV4PFxsNTuxpGAjlNFlFMTfZkk= github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.5 h1:tEo8BVH4OZuJ/q9ii1H4PdtxlXLh/kOKpRuWFTHOcBc= diff --git a/go.mod b/go.mod index 4682b42ca..7fbe65dce 100644 --- a/go.mod +++ b/go.mod @@ -2,17 +2,12 @@ module github.com/edgexfoundry/app-functions-sdk-go/v3 go 1.18 -replace ( - github.com/edgexfoundry/go-mod-core-contracts/v3 => ../../MODS/go-mod-core-contracts - github.com/edgexfoundry/go-mod-messaging/v3 => ../MODS/go-mod-messaging -) - require ( github.com/diegoholiveira/jsonlogic/v3 v3.2.6 github.com/eclipse/paho.mqtt.golang v1.4.2 github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11 - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.6 - github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.4 + github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9 + github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 github.com/fxamacker/cbor/v2 v2.4.0 github.com/gomodule/redigo v1.8.9 diff --git a/go.sum b/go.sum index f1576be08..228cb2db5 100644 --- a/go.sum +++ b/go.sum @@ -28,10 +28,14 @@ github.com/diegoholiveira/jsonlogic/v3 v3.2.6 h1:EV607wRY72hT3V90ZOQw+zjXR9KIUV9 github.com/diegoholiveira/jsonlogic/v3 v3.2.6/go.mod h1:9oE8z9G+0OMxOoLHF3fhek3KuqD5CBqM0B6XFL08MSg= github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4= github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11 h1:PHkcIC9hwOG2XyumsdO4hfavzd96GHs7kJZE8Ih9/cY= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.11/go.mod h1:UjrW9GZ5UjKZLF1EzEtAjvrgOvgQz3FGyVyAAX+fXW4= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.2 h1:xp5MsP+qf/fuJxy8fT7k1N+c4j4C6w04qMCBXm6id7o= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.2/go.mod h1:1Vv4uWAo6r7k6jUlqVJW8JOL6YKVBc6sRL8Al3DrMck= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.6 h1:RQFs/HjVOi1X3YxJ8sm4vuX8nhKgH0caSf9RtjQvdeI= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.6/go.mod h1:7RwSq896VqelvSU7zYKs2tpZhgELVFECkiGf6XGLKfQ= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9 h1:ejafyDHaVCdfKW4IQZeg4n1mBI2JkC1Y1XXelyyj+z8= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.9/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 h1:jgDQA/7SENURXQkIX11pNgA/pX9IK9ZULenj/vF17Vw= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7/go.mod h1:r6Klfz+QBDx1Z5UV0z70MKdK2/cgHwhtqTm2HFXoWug= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 h1:QgZF9f70Cwpvkjw3tP1aiVGHc+yNFJNzW6hO8pDs3fg= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3/go.mod h1:2w8v0sv+i21nY+DY6JV4PFxsNTuxpGAjlNFlFMTfZkk= github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.5 h1:tEo8BVH4OZuJ/q9ii1H4PdtxlXLh/kOKpRuWFTHOcBc= diff --git a/internal/trigger/messagebus/messaging_test.go b/internal/trigger/messagebus/messaging_test.go index 42ef6f288..8356666c5 100644 --- a/internal/trigger/messagebus/messaging_test.go +++ b/internal/trigger/messagebus/messaging_test.go @@ -28,8 +28,8 @@ import ( bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" - "github.com/edgexfoundry/app-functions-sdk-go/v3/internal/trigger/messagebus/mocks" interfaceMocks "github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces/mocks" "github.com/stretchr/testify/mock" diff --git a/internal/trigger/messagebus/mocks/MessageClient.go b/internal/trigger/messagebus/mocks/MessageClient.go deleted file mode 100644 index 46e349121..000000000 --- a/internal/trigger/messagebus/mocks/MessageClient.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. - -package mocks - -import ( - types "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" - mock "github.com/stretchr/testify/mock" -) - -// MessageClient is an autogenerated mock type for the MessageClient type -type MessageClient struct { - mock.Mock -} - -// Connect provides a mock function with given fields: -func (_m *MessageClient) Connect() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Disconnect provides a mock function with given fields: -func (_m *MessageClient) Disconnect() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Publish provides a mock function with given fields: message, topic -func (_m *MessageClient) Publish(message types.MessageEnvelope, topic string) error { - ret := _m.Called(message, topic) - - var r0 error - if rf, ok := ret.Get(0).(func(types.MessageEnvelope, string) error); ok { - r0 = rf(message, topic) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Subscribe provides a mock function with given fields: topics, messageErrors -func (_m *MessageClient) Subscribe(topics []types.TopicChannel, messageErrors chan error) error { - ret := _m.Called(topics, messageErrors) - - var r0 error - if rf, ok := ret.Get(0).(func([]types.TopicChannel, chan error) error); ok { - r0 = rf(topics, messageErrors) - } else { - r0 = ret.Error(0) - } - - return r0 -}