45 Star 300 Fork 75

GVPYoMo / yomo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
zipper_test.go 762 Bytes
一键复制 编辑 原始数据 按行查看 历史
package yomo
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/yomorun/yomo/core"
"github.com/yomorun/yomo/core/router"
"github.com/yomorun/yomo/core/ylog"
"github.com/yomorun/yomo/pkg/config"
)
func TestZipperRun(t *testing.T) {
zipper, err := NewZipper(
"zipper",
router.Default(),
core.DefaultVersionNegotiateFunc,
map[string]config.Mesh{},
// WithAuth("token", "<CREDENTIAL>"),
WithUpstreamOption(core.ClientOption(WithCredential("token:<CREDENTIAL>"))),
WithZipperLogger(ylog.Default()),
WithZipperQuicConfig(core.DefaultQuicConfig),
WithZipperTLSConfig(nil),
)
assert.Nil(t, err)
time.Sleep(time.Second)
assert.NotNil(t, zipper)
err = zipper.Close()
time.Sleep(time.Second)
assert.Nil(t, err)
}
Go
1
https://gitee.com/yomorun/yomo.git
git@gitee.com:yomorun/yomo.git
yomorun
yomo
yomo
master

搜索帮助