diff --git a/cmd/gh-aw/help_sections_order_test.go b/cmd/gh-aw/help_sections_order_test.go index af418c96a1b..10e9b83ca87 100644 --- a/cmd/gh-aw/help_sections_order_test.go +++ b/cmd/gh-aw/help_sections_order_test.go @@ -11,6 +11,7 @@ import ( ) func TestUsageAppearsBeforeExamplesInHelpOutput(t *testing.T) { + t.Parallel() commands := []*cobra.Command{ compileCmd, disableCmd, @@ -23,6 +24,7 @@ func TestUsageAppearsBeforeExamplesInHelpOutput(t *testing.T) { for _, cmd := range commands { t.Run(cmd.CommandPath(), func(t *testing.T) { + t.Parallel() var out bytes.Buffer originalOut := cmd.OutOrStdout() originalErr := cmd.ErrOrStderr() diff --git a/cmd/gh-aw/short_description_test.go b/cmd/gh-aw/short_description_test.go index dbce7872363..df20a1a7cab 100644 --- a/cmd/gh-aw/short_description_test.go +++ b/cmd/gh-aw/short_description_test.go @@ -18,6 +18,7 @@ func TestShortDescriptionConsistency(t *testing.T) { t.Parallel() for _, cmd := range collectCommandTree(rootCmd) { t.Run("command "+cmd.Name()+" has no trailing punctuation", func(t *testing.T) { + t.Parallel() short := cmd.Short if short == "" { t.Skip("Command has no Short description") diff --git a/pkg/actionpins/actionpins_internal_test.go b/pkg/actionpins/actionpins_internal_test.go index 88d8739a7c4..86e51b9628c 100644 --- a/pkg/actionpins/actionpins_internal_test.go +++ b/pkg/actionpins/actionpins_internal_test.go @@ -360,6 +360,7 @@ func TestFindCompatiblePin_SemverFallback(t *testing.T) { } func TestFindVersionBySHA_ReturnsVersionForKnownSHA(t *testing.T) { + t.Parallel() t.Run("returns version for a known SHA in embedded data", func(t *testing.T) { pins := GetActionPinsByRepo("actions/checkout") require.NotEmpty(t, pins, "prerequisite: embedded pins must exist for actions/checkout") diff --git a/pkg/actionpins/spec_test.go b/pkg/actionpins/spec_test.go index 0c6971c927e..994db57b946 100644 --- a/pkg/actionpins/spec_test.go +++ b/pkg/actionpins/spec_test.go @@ -83,6 +83,7 @@ func TestSpec_PublicAPI_FormatPinnedActionReference(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() if tt.wantPanic != "" { assert.Empty(t, tt.expected, "test case %q: wantPanic and expected are mutually exclusive", tt.name) require.PanicsWithValue(t, tt.wantPanic, func() { @@ -140,6 +141,7 @@ func TestSpec_PublicAPI_FormatCacheKey(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result := actionpins.FormatCacheKey(tt.repo, tt.version) assert.Equal(t, tt.expected, result, "FormatCacheKey(%q, %q) should match spec format", tt.repo, tt.version) }) @@ -188,6 +190,7 @@ func TestSpec_PublicAPI_ExtractRepo(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result := actionpins.ExtractRepo(tt.uses) assert.Equal(t, tt.expected, result, "ExtractRepo(%q) should return repo part", tt.uses) }) @@ -236,6 +239,7 @@ func TestSpec_PublicAPI_ExtractVersion(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result := actionpins.ExtractVersion(tt.uses) assert.Equal(t, tt.expected, result, "ExtractVersion(%q) should return version part", tt.uses) }) @@ -359,6 +363,7 @@ func TestSpec_PublicAPI_ResolveActionPin_EnforcePinned(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() var failures []actionpins.ResolutionFailure ctx := &actionpins.PinContext{ Resolver: tt.resolver, @@ -703,6 +708,7 @@ func TestSpec_PublicAPI_RecordResolutionFailure(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() var failures []actionpins.ResolutionFailure ctx := &actionpins.PinContext{ Resolver: tt.resolver, diff --git a/pkg/agentdrain/anomaly_test.go b/pkg/agentdrain/anomaly_test.go index 2208fb84234..8499c18274a 100644 --- a/pkg/agentdrain/anomaly_test.go +++ b/pkg/agentdrain/anomaly_test.go @@ -486,6 +486,7 @@ func TestAnalyzeEvent(t *testing.T) { // TestAnalyzeEvent_Variants covers edge-case event shapes: empty stage and nil/empty fields. func TestAnalyzeEvent_Variants(t *testing.T) { + t.Parallel() tests := []struct { name string evt AgentEvent diff --git a/pkg/agentdrain/miner_test.go b/pkg/agentdrain/miner_test.go index ac95d443f6d..fcb59af9251 100644 --- a/pkg/agentdrain/miner_test.go +++ b/pkg/agentdrain/miner_test.go @@ -13,6 +13,7 @@ import ( ) func TestNewMiner(t *testing.T) { + t.Parallel() cfg := DefaultConfig() m, err := NewMiner(cfg) require.NoError(t, err, "NewMiner should not return an error") diff --git a/pkg/agentdrain/spec_test.go b/pkg/agentdrain/spec_test.go index 8f782e1f3d2..63f4fa96ca6 100644 --- a/pkg/agentdrain/spec_test.go +++ b/pkg/agentdrain/spec_test.go @@ -186,6 +186,7 @@ func TestSpec_PublicAPI_Utility_Tokenize(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result := agentdrain.Tokenize(tt.line) assert.Equal(t, tt.expected, result, "Tokenize(%q) mismatch", tt.line) }) @@ -197,6 +198,7 @@ func TestSpec_PublicAPI_Utility_Tokenize(t *testing.T) { func TestSpec_PublicAPI_Utility_FlattenEvent(t *testing.T) { t.Parallel() t.Run("excludes listed fields", func(t *testing.T) { + t.Parallel() evt := agentdrain.AgentEvent{ Stage: "plan", Fields: map[string]string{ @@ -210,6 +212,7 @@ func TestSpec_PublicAPI_Utility_FlattenEvent(t *testing.T) { }) t.Run("produces deterministic output for same input", func(t *testing.T) { + t.Parallel() evt := agentdrain.AgentEvent{ Stage: "tool_call", Fields: map[string]string{ @@ -257,6 +260,7 @@ func TestSpec_PublicAPI_Utility_StageSequence(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result := agentdrain.StageSequence(tt.events) assert.Equal(t, tt.expected, result, "StageSequence mismatch for %q", tt.name) }) diff --git a/pkg/cli/access_log_test.go b/pkg/cli/access_log_test.go index 8cd38cb6b8e..27cd15e95ea 100644 --- a/pkg/cli/access_log_test.go +++ b/pkg/cli/access_log_test.go @@ -158,6 +158,7 @@ func TestExtractDomainFromURL(t *testing.T) { for _, tt := range tests { t.Run(tt.url, func(t *testing.T) { + t.Parallel() result := stringutil.ExtractDomainFromURL(tt.url) assert.Equal(t, tt.expected, result, "should extract correct domain from URL") }) @@ -225,6 +226,7 @@ func TestParseSquidLogLine(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() result, err := parseSquidLogLine(tt.line) if tt.shouldErr { @@ -296,6 +298,7 @@ func TestAddMetrics(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() tt.base.AddMetrics(tt.toAdd) assert.Equal(t, tt.expected.TotalRequests, tt.base.TotalRequests, "total requests should match") assert.Equal(t, tt.expected.AllowedRequests, tt.base.AllowedRequests, "allowed requests should match") diff --git a/pkg/cli/actions_build_command_test.go b/pkg/cli/actions_build_command_test.go index 318293cbff5..56e8869a436 100644 --- a/pkg/cli/actions_build_command_test.go +++ b/pkg/cli/actions_build_command_test.go @@ -58,6 +58,7 @@ func TestActionsCleanCommand_NoActionsDir(t *testing.T) { } func TestGetActionDirectories(t *testing.T) { + t.Parallel() tests := []struct { name string setup func(string) error @@ -129,6 +130,7 @@ func TestGetActionDirectories(t *testing.T) { } func TestGetActionDirectories_SortedOutput(t *testing.T) { + t.Parallel() tmpDir := t.TempDir() actionsDir := filepath.Join(tmpDir, "actions") // Create directories in reverse-alphabetical order to verify sorting @@ -142,6 +144,7 @@ func TestGetActionDirectories_SortedOutput(t *testing.T) { } func TestValidateActionYml(t *testing.T) { + t.Parallel() tests := []struct { name string actionYmlContent string @@ -243,6 +246,7 @@ runs: } func TestGetActionDependencies(t *testing.T) { + t.Parallel() tests := []struct { name string actionName string @@ -262,6 +266,7 @@ func TestGetActionDependencies(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() deps := getActionDependencies(tt.actionName) assert.GreaterOrEqual(t, len(deps), tt.minDeps, "Should return at least minimum dependencies") }) @@ -326,6 +331,7 @@ func TestActionsCleanCommand_EmptyActionsDir(t *testing.T) { } func TestIsCompositeAction(t *testing.T) { + t.Parallel() tests := []struct { name string actionYmlContent string diff --git a/pkg/cli/add_command_test.go b/pkg/cli/add_command_test.go index af467e00cdf..ea90a8c037e 100644 --- a/pkg/cli/add_command_test.go +++ b/pkg/cli/add_command_test.go @@ -24,6 +24,7 @@ func validateEngineStub(engine string) error { } func TestNewAddCommand(t *testing.T) { + t.Parallel() cmd := NewAddCommand(validateEngineStub) require.NotNil(t, cmd, "NewAddCommand should not return nil") @@ -84,6 +85,7 @@ func TestNewAddCommand(t *testing.T) { } func TestNewAddCommand_MentionsEnterpriseSourceResolution(t *testing.T) { + t.Parallel() cmd := NewAddCommand(validateEngineStub) require.NotNil(t, cmd)