mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-30 09:06:03 +03:00
35 lines
919 B
Go
35 lines
919 B
Go
package command_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/xtls/xray-core/app/dispatcher"
|
|
"github.com/xtls/xray-core/app/log"
|
|
. "github.com/xtls/xray-core/app/log/command"
|
|
"github.com/xtls/xray-core/app/proxyman"
|
|
_ "github.com/xtls/xray-core/app/proxyman/inbound"
|
|
_ "github.com/xtls/xray-core/app/proxyman/outbound"
|
|
"github.com/xtls/xray-core/common"
|
|
"github.com/xtls/xray-core/common/serial"
|
|
"github.com/xtls/xray-core/core"
|
|
)
|
|
|
|
func TestLoggerRestart(t *testing.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{}),
|
|
},
|
|
})
|
|
common.Must(err)
|
|
common.Must(v.Start())
|
|
|
|
server := &LoggerServer{
|
|
V: v,
|
|
}
|
|
common.Must2(server.RestartLogger(context.Background(), &RestartLoggerRequest{}))
|
|
}
|