1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
v2fly/app/log/command/command_test.go
Darien Raymond 3734195156
fix log test
2018-02-20 22:07:50 +01:00

39 lines
856 B
Go

package command_test
import (
"context"
"testing"
"v2ray.com/core"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/log"
. "v2ray.com/core/app/log/command"
"v2ray.com/core/app/proxyman"
_ "v2ray.com/core/app/proxyman/inbound"
_ "v2ray.com/core/app/proxyman/outbound"
"v2ray.com/core/common/serial"
. "v2ray.com/ext/assert"
)
func TestLoggerRestart(t *testing.T) {
assert := With(t)
v, err := core.New(&core.Config{
App: []*serial.TypedMessage{
serial.ToTypedMessage(&log.Config{}),
serial.ToTypedMessage(&dispatcher.Config{}),
serial.ToTypedMessage(&proxyman.InboundConfig{}),
serial.ToTypedMessage(&proxyman.OutboundConfig{}),
},
})
assert(err, IsNil)
assert(v.Start(), IsNil)
server := &LoggerServer{
V: v,
}
_, err = server.RestartLogger(context.Background(), &RestartLoggerRequest{})
assert(err, IsNil)
}