V2bX/core/hy/server_test.go

29 lines
604 B
Go
Raw Normal View History

package hy
import (
"github.com/Yuzuki616/V2bX/api/panel"
"github.com/Yuzuki616/V2bX/conf"
2023-06-09 00:36:49 -04:00
"github.com/sirupsen/logrus"
"testing"
)
func TestServer(t *testing.T) {
2023-06-09 00:36:49 -04:00
logrus.SetLevel(logrus.DebugLevel)
s := NewServer("test")
t.Log(s.runServer(&panel.NodeInfo{
Port: 11415,
UpMbps: 100,
DownMbps: 100,
HyObfs: "atresssdaaaadd",
}, &conf.ControllerConfig{
ListenIP: "127.0.0.1",
2023-06-09 00:36:49 -04:00
HyOptions: conf.HyOptions{},
CertConfig: &conf.CertConfig{
CertFile: "../../test_data/1.pem",
KeyFile: "../../test_data/1.key",
},
}))
2023-06-09 00:36:49 -04:00
s.users.Store("test1111", struct{}{})
select {}
}