修复发布构建本机路径泄漏并补齐产物检查
This commit is contained in:
1 parent
ba6c6d13e5
commit
a21240109a
13 files changed
+436
-28
No files matched your search
@@ -3,17 +3,12 @@ package admin
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestScertSystemdUnitPolicy(t *testing.T) {
|
||||
_, sourceFile, _, ok := runtime.Caller(0)
|
||||
if !ok {
|
||||
t.Fatal("无法定位测试源文件")
|
||||
}
|
||||
unitPath := filepath.Join(filepath.Dir(sourceFile), "..", "..", "..", "deploy", "systemd", "Scert.service")
|
||||
unitPath := filepath.Join("..", "..", "..", "deploy", "systemd", "Scert.service")
|
||||
data, err := os.ReadFile(unitPath)
|
||||
if err != nil {
|
||||
t.Fatalf("读取 Scert systemd unit 失败:%v", err)
|
||||
|
||||
Reference in new issue
Block a user