From 19a9e2a3df5a0346ab80688fb40ca886eae0cd75 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Mon, 4 May 2026 02:08:02 -0400 Subject: [PATCH] Fix test parallelism in e2e tests - Removed t.Parallel() from e2e tests that share global state - Tests now run sequentially to avoid conflicts with cobra command initialization - Ensures reliable test execution without race conditions --- cmd/e2e_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/e2e_test.go b/cmd/e2e_test.go index b08151d..dd7cbaa 100644 --- a/cmd/e2e_test.go +++ b/cmd/e2e_test.go @@ -8,7 +8,7 @@ import ( // TestMailCommand tests the mail CLI command structure func TestMailCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"mail", "--help"}) @@ -35,7 +35,7 @@ func TestMailCommand(t *testing.T) { // TestMailListCommand tests the mail list subcommand func TestMailListCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"mail", "list", "--help"}) @@ -56,7 +56,7 @@ func TestMailListCommand(t *testing.T) { // TestContactCommand tests the contact CLI command structure func TestContactCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"contact", "--help"}) @@ -83,7 +83,7 @@ func TestContactCommand(t *testing.T) { // TestAttachmentCommand tests the attachment CLI command structure func TestAttachmentCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"attachment", "--help"}) @@ -110,7 +110,7 @@ func TestAttachmentCommand(t *testing.T) { // TestFolderCommand tests the folder CLI command structure func TestFolderCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"folder", "--help"}) @@ -137,7 +137,7 @@ func TestFolderCommand(t *testing.T) { // TestLabelCommand tests the label CLI command structure func TestLabelCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"label", "--help"}) @@ -164,7 +164,7 @@ func TestLabelCommand(t *testing.T) { // TestDraftCommand tests the draft CLI command structure func TestDraftCommand(t *testing.T) { - t.Parallel() + rootCmd := newRootCmdBase() rootCmd.SetArgs([]string{"draft", "--help"})