From 3e2072474960b8d7b87c5b8b785598f268e82668 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 11 Jun 2020 13:46:48 +0200 Subject: [PATCH] Feat: updated to latest hive.go (#463) * Feat: updated to latest hive.go * Fix: fixed bugs related to api change * Feat: bump integration tests Co-authored-by: Hans Moog <hm@mkjc.net> --- go.mod | 2 +- go.sum | 4 ++-- plugins/cli/plugin.go | 4 ++-- plugins/webapi/info/plugin.go | 8 ++++---- tools/integration-tests/tester/go.mod | 2 +- tools/integration-tests/tester/go.sum | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index b2a9251a..592fae32 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/gobuffalo/packr/v2 v2.7.1 github.com/golang/protobuf v1.3.5 github.com/gorilla/websocket v1.4.1 - github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c + github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242 github.com/iotaledger/iota.go v1.0.0-beta.14 github.com/labstack/echo v3.3.10+incompatible github.com/labstack/gommon v0.3.0 diff --git a/go.sum b/go.sum index 3a33c2d4..9c42f993 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c h1:092HC7xRUSHpoXoAz2oTNWzfHDMMu3tEZsg2RF131hA= -github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c/go.mod h1:zwZhaE4ZeglpTrbmbwdnVPMI5XdRu2RmByi3Qn0ztmU= +github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242 h1:uHMFmfrP6O6lp1lCHT6lpFwHFWYk77V0nUlGbhneQHI= +github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242/go.mod h1:zwZhaE4ZeglpTrbmbwdnVPMI5XdRu2RmByi3Qn0ztmU= github.com/iotaledger/iota.go v1.0.0-beta.9/go.mod h1:F6WBmYd98mVjAmmPVYhnxg8NNIWCjjH8VWT9qvv3Rc8= github.com/iotaledger/iota.go v1.0.0-beta.14 h1:Oeb28MfBuJEeXcGrLhTCJFtbsnc8y1u7xidsAmiOD5A= github.com/iotaledger/iota.go v1.0.0-beta.14/go.mod h1:F6WBmYd98mVjAmmPVYhnxg8NNIWCjjH8VWT9qvv3Rc8= diff --git a/plugins/cli/plugin.go b/plugins/cli/plugin.go index 2875dcde..99bb6368 100644 --- a/plugins/cli/plugin.go +++ b/plugins/cli/plugin.go @@ -21,8 +21,8 @@ var ( ) func init() { - for name, status := range node.GetPlugins() { - onAddPlugin(name, status) + for name, plugin := range node.GetPlugins() { + onAddPlugin(name, plugin.Status) } node.Events.AddPlugin.Attach(events.NewClosure(onAddPlugin)) diff --git a/plugins/webapi/info/plugin.go b/plugins/webapi/info/plugin.go index 5dfc6f15..2aa6d89c 100644 --- a/plugins/webapi/info/plugin.go +++ b/plugins/webapi/info/plugin.go @@ -59,12 +59,12 @@ func configure(_ *node.Plugin) { func getInfo(c echo.Context) error { var enabledPlugins []string var disabledPlugins []string - for plugin, status := range node.GetPlugins() { - switch status { + for pluginName, plugin := range node.GetPlugins() { + switch plugin.Status { case node.Disabled: - disabledPlugins = append(disabledPlugins, plugin) + disabledPlugins = append(disabledPlugins, pluginName) case node.Enabled: - enabledPlugins = append(enabledPlugins, plugin) + enabledPlugins = append(enabledPlugins, pluginName) default: continue } diff --git a/tools/integration-tests/tester/go.mod b/tools/integration-tests/tester/go.mod index f7331d45..81fe8f1d 100644 --- a/tools/integration-tests/tester/go.mod +++ b/tools/integration-tests/tester/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/go-units v0.4.0 // indirect github.com/drand/drand v0.8.1 github.com/iotaledger/goshimmer v0.1.3 - github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c + github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242 github.com/opencontainers/go-digest v1.0.0-rc1 // indirect github.com/stretchr/testify v1.5.1 ) diff --git a/tools/integration-tests/tester/go.sum b/tools/integration-tests/tester/go.sum index aadb3c43..dcd5ef8f 100644 --- a/tools/integration-tests/tester/go.sum +++ b/tools/integration-tests/tester/go.sum @@ -138,8 +138,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c h1:092HC7xRUSHpoXoAz2oTNWzfHDMMu3tEZsg2RF131hA= -github.com/iotaledger/hive.go v0.0.0-20200608165853-97365812038c/go.mod h1:zwZhaE4ZeglpTrbmbwdnVPMI5XdRu2RmByi3Qn0ztmU= +github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242 h1:uHMFmfrP6O6lp1lCHT6lpFwHFWYk77V0nUlGbhneQHI= +github.com/iotaledger/hive.go v0.0.0-20200610104211-d603429af242/go.mod h1:zwZhaE4ZeglpTrbmbwdnVPMI5XdRu2RmByi3Qn0ztmU= github.com/iotaledger/iota.go v1.0.0-beta.9/go.mod h1:F6WBmYd98mVjAmmPVYhnxg8NNIWCjjH8VWT9qvv3Rc8= github.com/iotaledger/iota.go v1.0.0-beta.14/go.mod h1:F6WBmYd98mVjAmmPVYhnxg8NNIWCjjH8VWT9qvv3Rc8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -- GitLab