unity容器监听
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.

42 lines
793 B

2 years ago
package biz
import (
"context"
"git.gz.internal.jumaiyx.cn/job/room-server-clear/pkg/room"
2 years ago
k8s_client "git.gz.internal.jumaiyx.cn/pkg/k8s-client"
2 years ago
"git.gz.internal.jumaiyx.cn/pkg/log"
"testing"
"time"
)
func TestNewBiz(t *testing.T) {
l := log.DefaultLogger()
2 years ago
roomServer, err := room.NewRoomService(l)
2 years ago
if err != nil {
t.Fatal(err)
}
2 years ago
deploy, err := k8s_client.NewDeployment(k8s_client.UnityNamespace, l)
if err != nil {
t.Fatal(err)
}
ser, err := k8s_client.NewService(k8s_client.UnityNamespace, l)
if err != nil {
t.Fatal(err)
}
n := NewBiz(l, roomServer)
n.room = roomServer
n.deploy = deploy
n.ser = ser
ctx := context.TODO()
go func() {
n.Deployment(ctx)
}()
2 years ago
go func() {
2 years ago
n.Service(ctx)
2 years ago
}()
go func() {
2 years ago
n.Room(ctx)
2 years ago
}()
time.Sleep(time.Second * 30)
}