9 Star 22 Fork 7

Gitee 极速下载 / Pouch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/alibaba/pouch.git
克隆/下载
main_test.go 589 Bytes
一键复制 编辑 原始数据 按行查看 历史
letty 提交于 2018-05-18 16:04 . test: add integration test coverage
package main
import (
"os"
"os/signal"
"strings"
"syscall"
"testing"
)
func TestMain(t *testing.T) {
var (
args []string
)
for _, arg := range os.Args {
switch {
case strings.HasPrefix(arg, "DEVEL"):
case strings.HasPrefix(arg, "-test"):
default:
args = append(args, arg)
}
}
waitCh := make(chan int, 1)
os.Args = args
go func() {
main()
close(waitCh)
}()
signalCh := make(chan os.Signal, 1)
signal.Notify(signalCh, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGHUP)
select {
case <-signalCh:
return
case <-waitCh:
return
}
}
Shell
1
https://gitee.com/mirrors/Pouch.git
git@gitee.com:mirrors/Pouch.git
mirrors
Pouch
Pouch
master

搜索帮助