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:
parent
e0bf53496a
commit
af0a4d2714
8 changed files with 55 additions and 43 deletions
|
|
@ -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")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue