1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-08-30 20:58:12 +02:00

transport: move key and namespace into redis_pubsub as it is redis specific.

This commit is contained in:
Henrik Hautakoski 2023-01-19 19:07:35 +01:00
parent e0bf53496a
commit af0a4d2714
8 changed files with 55 additions and 43 deletions

View file

@ -12,11 +12,11 @@ import (
func TestRedisPubsub(t *testing.T) {
client, mock := redismock.NewClientMock()
pubsub := New(client)
pubsub := New(client, Namespace{ChainID: "id"})
mock.MatchExpectationsInOrder(true)
mock.ExpectPublish("test", []byte("some string")).SetVal(0)
mock.ExpectPublish("test2", []byte("some other string")).SetVal(0)
mock.ExpectPublish("ship::id::test", []byte("some string")).SetVal(0)
mock.ExpectPublish("ship::id::test2", []byte("some other string")).SetVal(0)
assert.NoError(t, pubsub.Publish(transport.Channel{"test"}, []byte("some string")))
assert.NoError(t, pubsub.Publish(transport.Channel{"test2"}, []byte("some other string")))