mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-13 06:50:25 +08:00
修复部分测试用例
This commit is contained in:
15
internal/utils/testutils/utils.go
Normal file
15
internal/utils/testutils/utils.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package testutils
|
||||
|
||||
import "os"
|
||||
|
||||
// IsSingleTesting 判断当前测试环境是否为单个函数测试
|
||||
func IsSingleTesting() bool {
|
||||
for _, arg := range os.Args {
|
||||
if arg == "-test.run" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user