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
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// TestMailCommand tests the mail CLI command structure
|
// TestMailCommand tests the mail CLI command structure
|
||||||
func TestMailCommand(t *testing.T) {
|
func TestMailCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"mail", "--help"})
|
rootCmd.SetArgs([]string{"mail", "--help"})
|
||||||
@@ -35,7 +35,7 @@ func TestMailCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestMailListCommand tests the mail list subcommand
|
// TestMailListCommand tests the mail list subcommand
|
||||||
func TestMailListCommand(t *testing.T) {
|
func TestMailListCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"mail", "list", "--help"})
|
rootCmd.SetArgs([]string{"mail", "list", "--help"})
|
||||||
@@ -56,7 +56,7 @@ func TestMailListCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestContactCommand tests the contact CLI command structure
|
// TestContactCommand tests the contact CLI command structure
|
||||||
func TestContactCommand(t *testing.T) {
|
func TestContactCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"contact", "--help"})
|
rootCmd.SetArgs([]string{"contact", "--help"})
|
||||||
@@ -83,7 +83,7 @@ func TestContactCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestAttachmentCommand tests the attachment CLI command structure
|
// TestAttachmentCommand tests the attachment CLI command structure
|
||||||
func TestAttachmentCommand(t *testing.T) {
|
func TestAttachmentCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"attachment", "--help"})
|
rootCmd.SetArgs([]string{"attachment", "--help"})
|
||||||
@@ -110,7 +110,7 @@ func TestAttachmentCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestFolderCommand tests the folder CLI command structure
|
// TestFolderCommand tests the folder CLI command structure
|
||||||
func TestFolderCommand(t *testing.T) {
|
func TestFolderCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"folder", "--help"})
|
rootCmd.SetArgs([]string{"folder", "--help"})
|
||||||
@@ -137,7 +137,7 @@ func TestFolderCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestLabelCommand tests the label CLI command structure
|
// TestLabelCommand tests the label CLI command structure
|
||||||
func TestLabelCommand(t *testing.T) {
|
func TestLabelCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"label", "--help"})
|
rootCmd.SetArgs([]string{"label", "--help"})
|
||||||
@@ -164,7 +164,7 @@ func TestLabelCommand(t *testing.T) {
|
|||||||
|
|
||||||
// TestDraftCommand tests the draft CLI command structure
|
// TestDraftCommand tests the draft CLI command structure
|
||||||
func TestDraftCommand(t *testing.T) {
|
func TestDraftCommand(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
rootCmd := newRootCmdBase()
|
rootCmd := newRootCmdBase()
|
||||||
rootCmd.SetArgs([]string{"draft", "--help"})
|
rootCmd.SetArgs([]string{"draft", "--help"})
|
||||||
|
|||||||
Reference in New Issue
Block a user