1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-26 10:43:42 +02:00

move channel stuffs from internal/redis to transport.

This commit is contained in:
Henrik Hautakoski 2023-01-13 13:38:04 +01:00
parent d0782c3c7c
commit b22118898d
8 changed files with 18 additions and 18 deletions

View file

@ -1,23 +0,0 @@
package redis
import "testing"
func TestNamespace_String(t *testing.T) {
tests := []struct {
name string
ns Namespace
want string
}{
{"Empty", Namespace{}, "ship::0000000000000000000000000000000000000000000000000000000000000000"},
{"Prefix Only", Namespace{Prefix: "some.prefix"}, "some.prefix::0000000000000000000000000000000000000000000000000000000000000000"},
{"ChainID Only", Namespace{ChainID: "1234"}, "ship::1234"},
{"Both", Namespace{Prefix: "my.prefix", ChainID: "1234"}, "my.prefix::1234"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.ns.String(); got != tt.want {
t.Errorf("Namespace.String() = %v, want %v", got, tt.want)
}
})
}
}