You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/app/log/command/command_test.go

35 lines
815 B

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