aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/app/app_test.go2
-rw-r--r--internal/app/dispatcher_test.go1
-rw-r--r--internal/app/env_test.go6
-rw-r--r--internal/app/outcome_test.go3
-rw-r--r--internal/app/path_test.go3
-rw-r--r--internal/app/spaccount_test.go1
-rw-r--r--internal/app/spcontainer_test.go3
-rw-r--r--internal/app/sysconf_test.go2
-rw-r--r--internal/app/username_test.go2
-rw-r--r--internal/path_test.go3
10 files changed, 25 insertions, 1 deletions
diff --git a/internal/app/app_test.go b/internal/app/app_test.go
index 01421528..2f42f70a 100644
--- a/internal/app/app_test.go
+++ b/internal/app/app_test.go
@@ -28,6 +28,7 @@ import (
)
func TestApp(t *testing.T) {
+ t.Parallel()
msg := message.NewMsg(nil)
msg.SwapVerbose(testing.Verbose())
@@ -445,6 +446,7 @@ func TestApp(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
gr, gw := io.Pipe()
var gotSys *system.I
diff --git a/internal/app/dispatcher_test.go b/internal/app/dispatcher_test.go
index b39986f2..3e608c3f 100644
--- a/internal/app/dispatcher_test.go
+++ b/internal/app/dispatcher_test.go
@@ -77,6 +77,7 @@ func checkOpBehaviour(t *testing.T, testCases []opBehaviourTestCase) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Helper()
+ t.Parallel()
wantCallsFull := slices.Concat(wantNewState, tc.toSystem, []stub.Call{{Name: stub.CallSeparator}})
if tc.wantErrSystem == nil {
diff --git a/internal/app/env_test.go b/internal/app/env_test.go
index b28c1568..9e2c959e 100644
--- a/internal/app/env_test.go
+++ b/internal/app/env_test.go
@@ -13,6 +13,8 @@ import (
)
func TestEnvPaths(t *testing.T) {
+ t.Parallel()
+
testCases := []struct {
name string
env *EnvPaths
@@ -48,6 +50,7 @@ func TestEnvPaths(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
if tc.wantPanic != "" {
defer func() {
if r := recover(); r != tc.wantPanic {
@@ -66,6 +69,8 @@ func TestEnvPaths(t *testing.T) {
}
func TestCopyPaths(t *testing.T) {
+ t.Parallel()
+
testCases := []struct {
name string
env map[string]string
@@ -84,6 +89,7 @@ func TestCopyPaths(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
if tc.fatal != "" {
defer stub.HandleExit(t)
}
diff --git a/internal/app/outcome_test.go b/internal/app/outcome_test.go
index 183dbfd4..53c8958d 100644
--- a/internal/app/outcome_test.go
+++ b/internal/app/outcome_test.go
@@ -8,6 +8,8 @@ import (
)
func TestOutcomeStateValid(t *testing.T) {
+ t.Parallel()
+
testCases := []struct {
name string
s *outcomeState
@@ -23,6 +25,7 @@ func TestOutcomeStateValid(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
if got := tc.s.valid(); got != tc.want {
t.Errorf("valid: %v, want %v", got, tc.want)
}
diff --git a/internal/app/path_test.go b/internal/app/path_test.go
index b01d73c4..1f2d8fa6 100644
--- a/internal/app/path_test.go
+++ b/internal/app/path_test.go
@@ -5,6 +5,8 @@ import (
)
func TestDeepContainsH(t *testing.T) {
+ t.Parallel()
+
testCases := []struct {
name string
basepath string
@@ -75,6 +77,7 @@ func TestDeepContainsH(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
if got, err := deepContainsH(tc.basepath, tc.targpath); (err != nil) != tc.wantErr {
t.Errorf("deepContainsH() error = %v, wantErr %v", err, tc.wantErr)
} else if got != tc.want {
diff --git a/internal/app/spaccount_test.go b/internal/app/spaccount_test.go
index a587c122..7ebda46f 100644
--- a/internal/app/spaccount_test.go
+++ b/internal/app/spaccount_test.go
@@ -12,6 +12,7 @@ import (
)
func TestSpAccountOp(t *testing.T) {
+ t.Parallel()
config := hst.Template()
checkOpBehaviour(t, []opBehaviourTestCase{
diff --git a/internal/app/spcontainer_test.go b/internal/app/spcontainer_test.go
index d5bb6d0e..6d5713cf 100644
--- a/internal/app/spcontainer_test.go
+++ b/internal/app/spcontainer_test.go
@@ -19,6 +19,7 @@ import (
)
func TestSpParamsOp(t *testing.T) {
+ t.Parallel()
config := hst.Template()
checkOpBehaviour(t, []opBehaviourTestCase{
@@ -422,5 +423,5 @@ type invalidFSHost bool
func (f invalidFSHost) Valid() bool { return bool(f) }
func (invalidFSHost) Path() *check.Absolute { panic("unreachable") }
func (invalidFSHost) Host() []*check.Absolute { return []*check.Absolute{nil} }
-func (invalidFSHost) Apply(z *hst.ApplyState) { panic("unreachable") }
+func (invalidFSHost) Apply(*hst.ApplyState) { panic("unreachable") }
func (invalidFSHost) String() string { panic("unreachable") }
diff --git a/internal/app/sysconf_test.go b/internal/app/sysconf_test.go
index b73f2d08..fb0c7f8a 100644
--- a/internal/app/sysconf_test.go
+++ b/internal/app/sysconf_test.go
@@ -7,6 +7,8 @@ const (
)
func TestSysconf(t *testing.T) {
+ t.Parallel()
+
t.Run("LOGIN_NAME_MAX", func(t *testing.T) {
if got := sysconf(_SC_LOGIN_NAME_MAX); got < _POSIX_LOGIN_NAME_MAX {
t.Errorf("sysconf(_SC_LOGIN_NAME_MAX): %d < _POSIX_LOGIN_NAME_MAX", got)
diff --git a/internal/app/username_test.go b/internal/app/username_test.go
index 15f15a4c..1b2e0459 100644
--- a/internal/app/username_test.go
+++ b/internal/app/username_test.go
@@ -6,6 +6,8 @@ import (
)
func TestIsValidUsername(t *testing.T) {
+ t.Parallel()
+
t.Run("long", func(t *testing.T) {
if isValidUsername(strings.Repeat("a", sysconf(_SC_LOGIN_NAME_MAX))) {
t.Errorf("isValidUsername unexpected true")
diff --git a/internal/path_test.go b/internal/path_test.go
index cb4571ef..5bcdd851 100644
--- a/internal/path_test.go
+++ b/internal/path_test.go
@@ -8,6 +8,8 @@ import (
)
func TestMustCheckPath(t *testing.T) {
+ t.Parallel()
+
testCases := []struct {
name string
pathname string
@@ -20,6 +22,7 @@ func TestMustCheckPath(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
+ t.Parallel()
fatal := func(v ...any) { t.Fatal(append([]any{"invalid call to fatal:"}, v...)...) }
if tc.wantFatal != "" {
fatal = func(v ...any) {