diff options
author | Valery Piashchynski <[email protected]> | 2020-11-18 11:08:09 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-18 11:08:09 +0300 |
commit | a136253bc88c1591cbab962af0506ff4c4cefc4b (patch) | |
tree | 6a6d173a85b31b436ce323044cfc066b50d8ba37 | |
parent | 46bb1d72ef7b43d253cc84393f054f05365bd22f (diff) |
Add Resetter tests to the CI and Makefile
-rwxr-xr-x | .github/workflows/ci-build.yml | 1 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | plugins/resetter/tests/resetter_test.go | 4 | ||||
-rw-r--r-- | plugins/resetter/tests/test_plugin.go | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c8f59645..8b462f81 100755 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -73,6 +73,7 @@ jobs: go test -v -race ./plugins/server/tests -tags=debug -coverprofile=server.txt -covermode=atomic go test -v -race ./plugins/metrics/tests -tags=debug -coverprofile=metrics.txt -covermode=atomic go test -v -race ./plugins/informer/tests -tags=debug -coverprofile=informer.txt -covermode=atomic + go test -v -race ./plugins/resetter/tests -tags=debug -coverprofile=informer.txt -covermode=atomic - name: Run code coverage uses: codecov/codecov-action@v1 @@ -6,4 +6,5 @@ test: go test -v -race -cover ./plugins/server/tests -tags=debug go test -v -race -cover ./plugins/logger/tests -tags=debug go test -v -race -cover ./plugins/metrics/tests -tags=debug - go test -v -race -cover ./plugins/informer/tests -tags=debug
\ No newline at end of file + go test -v -race -cover ./plugins/informer/tests -tags=debug + go test -v -race -cover ./plugins/resetter/tests -tags=debug
\ No newline at end of file diff --git a/plugins/resetter/tests/resetter_test.go b/plugins/resetter/tests/resetter_test.go index 03accc67..ff5a7847 100644 --- a/plugins/resetter/tests/resetter_test.go +++ b/plugins/resetter/tests/resetter_test.go @@ -53,7 +53,7 @@ func TestInformerInit(t *testing.T) { tt := time.NewTimer(time.Second * 15) - t.Run("InformerRpcTest", informerRpcTest) + t.Run("InformerRpcTest", resetterRpcTest) for { select { @@ -80,7 +80,7 @@ func TestInformerInit(t *testing.T) { } } -func informerRpcTest(t *testing.T) { +func resetterRpcTest(t *testing.T) { conn, err := net.Dial("tcp", "127.0.0.1:6001") assert.NoError(t, err) client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn)) diff --git a/plugins/resetter/tests/test_plugin.go b/plugins/resetter/tests/test_plugin.go index 6dc311d6..9f48a43f 100644 --- a/plugins/resetter/tests/test_plugin.go +++ b/plugins/resetter/tests/test_plugin.go @@ -60,5 +60,7 @@ func (p1 *Plugin1) Reset() error { panic(err) } + _ = pool + return nil } |