summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/informer/informer_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/plugins/informer/informer_test.go b/tests/plugins/informer/informer_test.go
index d40d7093..61be85a1 100644
--- a/tests/plugins/informer/informer_test.go
+++ b/tests/plugins/informer/informer_test.go
@@ -85,11 +85,27 @@ func TestInformerInit(t *testing.T) {
time.Sleep(time.Second)
t.Run("InformerWorkersRpcTest", informerWorkersRPCTest)
t.Run("InformerListRpcTest", informerListRPCTest)
+ t.Run("InformerPluginWithoutWorkersRpcTest", informerPluginWOWorkersRPCTest)
stopCh <- struct{}{}
wg.Wait()
}
+func informerPluginWOWorkersRPCTest(t *testing.T) {
+ conn, err := net.Dial("tcp", "127.0.0.1:6001")
+ assert.NoError(t, err)
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
+ // WorkerList contains list of workers.
+ list := struct {
+ // Workers is list of workers.
+ Workers []process.State `json:"workers"`
+ }{}
+
+ err = client.Call("informer.Workers", "informer.config", &list)
+ assert.NoError(t, err)
+ assert.Len(t, list.Workers, 0)
+}
+
func informerWorkersRPCTest(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6001")
assert.NoError(t, err)