1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 14:42:27 +08:00

test: add parallel running for all unit test functions

This commit is contained in:
dudaodong
2023-06-30 10:18:45 +08:00
parent ab364744b6
commit 8229de2f10
15 changed files with 480 additions and 16 deletions

View File

@@ -8,6 +8,8 @@ import (
)
func TestOsDetection(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestOsJudgment")
osType, _, _ := ExecCommand("echo $OSTYPE")
@@ -20,6 +22,8 @@ func TestOsDetection(t *testing.T) {
}
func TestOsEnvOperation(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestOsEnvOperation")
envNotExist := GetOsEnv("foo")
@@ -44,6 +48,8 @@ func TestOsEnvOperation(t *testing.T) {
}
func TestExecCommand(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestExecCommand")
// linux or mac
@@ -79,6 +85,8 @@ func TestExecCommand(t *testing.T) {
// }
func TestGetOsBits(t *testing.T) {
t.Parallel()
osBits := GetOsBits()
switch osBits {
case 32, 64: