package handler import ( "github.com/stretchr/testify/assert" "samba/pkg/servername" "samba/proto" "samba/util/routingKey" "samba/util/sender" "samba/util/util" "testing" ) func Test_onModifyTimeOffset(t *testing.T) { s := sender.NewMQSender( util.Direct(servername.Other), routingKey.Other, ) req := &proto.ReqModifyTimeOffset{ Offset: 3600 * 8, } rsp := &proto.RspModifyTimeOffset{} err := s.Call(proto.ReqModifyTimeOffsetId, req, rsp) assert.NoError(t, err) t.Logf("before: %s, after: %s", rsp.Ts["other"].TimeBeforeStr, rsp.Ts["other"].TimeAfterStr) }