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.
|
|
|
package biz
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"git.gz.internal.jumaiyx.cn/pkg/log"
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewBiz(t *testing.T) {
|
|
|
|
time.Sleep(time.Second * 30)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestCheck(t *testing.T) {
|
|
|
|
l := log.DefaultLogger()
|
|
|
|
build := NewBiz(l)
|
|
|
|
build.Check(context.TODO())
|
|
|
|
}
|
|
|
|
func TestNewBiz_Deployment(t *testing.T) {
|
|
|
|
l := log.DefaultLogger()
|
|
|
|
build := NewBiz(l)
|
|
|
|
wg.Add(2)
|
|
|
|
go func() {
|
|
|
|
defer wg.Done()
|
|
|
|
build.deployment(context.TODO())
|
|
|
|
}()
|
|
|
|
go func() {
|
|
|
|
defer wg.Done()
|
|
|
|
build.deploymentDel(context.TODO())
|
|
|
|
}()
|
|
|
|
wg.Wait()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNewBiz_Service(t *testing.T) {
|
|
|
|
l := log.DefaultLogger()
|
|
|
|
build := NewBiz(l)
|
|
|
|
wg.Add(2)
|
|
|
|
go func() {
|
|
|
|
defer wg.Done()
|
|
|
|
build.service(context.TODO())
|
|
|
|
}()
|
|
|
|
go func() {
|
|
|
|
defer wg.Done()
|
|
|
|
build.serviceDel(context.TODO())
|
|
|
|
}()
|
|
|
|
wg.Wait()
|
|
|
|
|
|
|
|
}
|