mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
v1.0.0
This commit is contained in:
parent
47d23e9972
commit
c7f7c08ead
711 changed files with 82154 additions and 2 deletions
34
app/log/command/command_test.go
Normal file
34
app/log/command/command_test.go
Normal file
|
@ -0,0 +1,34 @@
|
|||
package command_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/xtls/xray-core/v1/app/dispatcher"
|
||||
"github.com/xtls/xray-core/v1/app/log"
|
||||
. "github.com/xtls/xray-core/v1/app/log/command"
|
||||
"github.com/xtls/xray-core/v1/app/proxyman"
|
||||
_ "github.com/xtls/xray-core/v1/app/proxyman/inbound"
|
||||
_ "github.com/xtls/xray-core/v1/app/proxyman/outbound"
|
||||
"github.com/xtls/xray-core/v1/common"
|
||||
"github.com/xtls/xray-core/v1/common/serial"
|
||||
"github.com/xtls/xray-core/v1/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{}))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue