summaryrefslogtreecommitdiff
path: root/plugins/metrics/tests/plugin2.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-14 17:18:28 +0300
committerValery Piashchynski <[email protected]>2020-11-14 17:18:28 +0300
commite45155e77e99e85e4ee9cd8863365bf6d599796e (patch)
treefe22608b4206fcab3219b824b5bd8cfaf5cfb85f /plugins/metrics/tests/plugin2.go
parente83f7d824e5f491fb50b4a9024ef7862aee9b6ca (diff)
More tests for the Metrics
Diffstat (limited to 'plugins/metrics/tests/plugin2.go')
-rw-r--r--plugins/metrics/tests/plugin2.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/plugins/metrics/tests/plugin2.go b/plugins/metrics/tests/plugin2.go
deleted file mode 100644
index 5d36b729..00000000
--- a/plugins/metrics/tests/plugin2.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package tests
-
-// plugin2 makes a call to the plugin1 via RPC
-// this is just a simulation of external call FOR TEST
-// you don't need to do such things :)
-type Plugin2 struct {
-}
-
-func (p2 *Plugin2) Init() error {
- return nil
-}
-
-func (p2 *Plugin2) Serve() chan error {
- errCh := make(chan error, 1)
-
- go func() {
- // time.Sleep(time.Second * 3)
- //
- // conn, err := net.Dial("tcp", "127.0.0.1:6001")
- // if err != nil {
- // errCh <- errors.E(errors.Serve, err)
- // return
- // }
- // client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
- // var ret string
- // err = client.Call("metrics_test.plugin1.Hello", "Valery", &ret)
- // if err != nil {
- // errCh <- err
- // return
- // }
- // if ret != "Hello, username: Valery" {
- // errCh <- errors.E("wrong response")
- // return
- // }
- // // to stop exec
- // errCh <- errors.E(errors.Disabled)
- return
- }()
-
- return errCh
-}
-
-func (p2 *Plugin2) Stop() error {
- return nil
-}