1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
alice-lg-alice-lg/pkg/sources/birdwatcher/source_multitable_test.go
2021-03-22 16:50:08 +01:00

26 lines
451 B
Go

package birdwatcher
import (
"testing"
)
func TestGetMasterPipeName(t *testing.T) {
config := Config{
PipeProtocolPrefix: "pp",
PeerTablePrefix: "pb",
}
bw := &MultiTableBirdwatcher{
GenericBirdwatcher: GenericBirdwatcher{
config: config,
},
}
peerProto := "pb_0200_as123456"
expected := "pp_0200_as123456"
if res := bw.getMasterPipeName(peerProto); res != expected {
t.Error("Expected:", peerProto, "but got:", res)
}
}