diff --git a/command/configtest_test.go b/command/configtest_test.go index 22b8cfd324..487045ab2f 100644 --- a/command/configtest_test.go +++ b/command/configtest_test.go @@ -22,10 +22,12 @@ func testConfigTestCommand(t *testing.T) (*cli.MockUi, *ConfigTestCommand) { } func TestConfigTestCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &ConfigTestCommand{} } func TestConfigTestCommandFailOnEmptyFile(t *testing.T) { + t.Parallel() tmpFile := testutil.TempFile(t, "consul") defer os.RemoveAll(tmpFile.Name()) @@ -41,6 +43,7 @@ func TestConfigTestCommandFailOnEmptyFile(t *testing.T) { } func TestConfigTestCommandSucceedOnEmptyDir(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -56,6 +59,7 @@ func TestConfigTestCommandSucceedOnEmptyDir(t *testing.T) { } func TestConfigTestCommandSucceedOnMinimalConfigFile(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -77,6 +81,7 @@ func TestConfigTestCommandSucceedOnMinimalConfigFile(t *testing.T) { } func TestConfigTestCommandSucceedOnMinimalConfigDir(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -97,6 +102,7 @@ func TestConfigTestCommandSucceedOnMinimalConfigDir(t *testing.T) { } func TestConfigTestCommandSucceedOnConfigDirWithEmptyFile(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) diff --git a/command/event_test.go b/command/event_test.go index 55f0070ee0..a3c00c3731 100644 --- a/command/event_test.go +++ b/command/event_test.go @@ -10,10 +10,12 @@ import ( ) func TestEventCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &EventCommand{} } func TestEventCommandRun(t *testing.T) { + t.Parallel() a1 := agent.NewTestAgent(t.Name(), nil) defer a1.Shutdown() diff --git a/command/exec_test.go b/command/exec_test.go index 60eb1b46b1..565e6a997f 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -24,10 +24,12 @@ func testExecCommand(t *testing.T) (*cli.MockUi, *ExecCommand) { } func TestExecCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &ExecCommand{} } func TestExecCommandRun(t *testing.T) { + t.Parallel() cfg := agent.TestConfig() cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) @@ -47,6 +49,7 @@ func TestExecCommandRun(t *testing.T) { } func TestExecCommandRun_CrossDC(t *testing.T) { + t.Parallel() cfg1 := agent.TestConfig() cfg1.DisableRemoteExec = agent.Bool(false) a1 := agent.NewTestAgent(t.Name(), cfg1) @@ -82,6 +85,7 @@ func TestExecCommandRun_CrossDC(t *testing.T) { } func TestExecCommand_Validate(t *testing.T) { + t.Parallel() conf := &rExecConf{} err := conf.validate() if err != nil { @@ -117,6 +121,7 @@ func TestExecCommand_Validate(t *testing.T) { } func TestExecCommand_Sessions(t *testing.T) { + t.Parallel() cfg := agent.TestConfig() cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) @@ -155,6 +160,7 @@ func TestExecCommand_Sessions(t *testing.T) { } func TestExecCommand_Sessions_Foreign(t *testing.T) { + t.Parallel() cfg := agent.TestConfig() cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) @@ -204,6 +210,7 @@ func TestExecCommand_Sessions_Foreign(t *testing.T) { } func TestExecCommand_UploadDestroy(t *testing.T) { + t.Parallel() cfg := agent.TestConfig() cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) @@ -258,6 +265,7 @@ func TestExecCommand_UploadDestroy(t *testing.T) { } func TestExecCommand_StreamResults(t *testing.T) { + t.Parallel() cfg := agent.TestConfig() cfg.DisableRemoteExec = agent.Bool(false) a := agent.NewTestAgent(t.Name(), cfg) diff --git a/command/force_leave_test.go b/command/force_leave_test.go index b033d67879..fef1dbe641 100644 --- a/command/force_leave_test.go +++ b/command/force_leave_test.go @@ -23,10 +23,12 @@ func testForceLeaveCommand(t *testing.T) (*cli.MockUi, *ForceLeaveCommand) { } func TestForceLeaveCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &ForceLeaveCommand{} } func TestForceLeaveCommandRun(t *testing.T) { + t.Parallel() a1 := agent.NewTestAgent(t.Name(), nil) a2 := agent.NewTestAgent(t.Name(), nil) defer a1.Shutdown() @@ -65,6 +67,7 @@ func TestForceLeaveCommandRun(t *testing.T) { } func TestForceLeaveCommandRun_noAddrs(t *testing.T) { + t.Parallel() ui := new(cli.MockUi) ui, c := testForceLeaveCommand(t) args := []string{"-http-addr=foo"} diff --git a/command/info_test.go b/command/info_test.go index 60c5da0002..8abca70144 100644 --- a/command/info_test.go +++ b/command/info_test.go @@ -10,10 +10,12 @@ import ( ) func TestInfoCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &InfoCommand{} } func TestInfoCommandRun(t *testing.T) { + t.Parallel() a1 := agent.NewTestAgent(t.Name(), nil) defer a1.Shutdown() diff --git a/command/join_test.go b/command/join_test.go index 6bbcbfb025..9cee715420 100644 --- a/command/join_test.go +++ b/command/join_test.go @@ -21,10 +21,12 @@ func testJoinCommand(t *testing.T) (*cli.MockUi, *JoinCommand) { } func TestJoinCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &JoinCommand{} } func TestJoinCommandRun(t *testing.T) { + t.Parallel() a1 := agent.NewTestAgent(t.Name(), nil) a2 := agent.NewTestAgent(t.Name(), nil) defer a1.Shutdown() @@ -47,6 +49,7 @@ func TestJoinCommandRun(t *testing.T) { } func TestJoinCommandRun_wan(t *testing.T) { + t.Parallel() a1 := agent.NewTestAgent(t.Name(), nil) a2 := agent.NewTestAgent(t.Name(), nil) defer a1.Shutdown() @@ -70,6 +73,7 @@ func TestJoinCommandRun_wan(t *testing.T) { } func TestJoinCommandRun_noAddrs(t *testing.T) { + t.Parallel() ui, c := testJoinCommand(t) args := []string{"-http-addr=foo"} diff --git a/command/keygen_test.go b/command/keygen_test.go index b131802f60..36fbbaba6e 100644 --- a/command/keygen_test.go +++ b/command/keygen_test.go @@ -9,10 +9,12 @@ import ( ) func TestKeygenCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KeygenCommand{} } func TestKeygenCommand(t *testing.T) { + t.Parallel() ui := new(cli.MockUi) c := &KeygenCommand{ Command: base.Command{ diff --git a/command/keyring_test.go b/command/keyring_test.go index 82d608808e..25b22d0067 100644 --- a/command/keyring_test.go +++ b/command/keyring_test.go @@ -20,10 +20,12 @@ func testKeyringCommand(t *testing.T) (*cli.MockUi, *KeyringCommand) { } func TestKeyringCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KeyringCommand{} } func TestKeyringCommandRun(t *testing.T) { + t.Parallel() key1 := "HS5lJ+XuTlYKWaeGYyG+/A==" key2 := "kZyFABeAmc64UMTrm9XuKA==" @@ -74,6 +76,7 @@ func TestKeyringCommandRun(t *testing.T) { } func TestKeyringCommandRun_help(t *testing.T) { + t.Parallel() ui, c := testKeyringCommand(t) code := c.Run(nil) if code != 1 { @@ -87,6 +90,7 @@ func TestKeyringCommandRun_help(t *testing.T) { } func TestKeyringCommandRun_failedConnection(t *testing.T) { + t.Parallel() ui, c := testKeyringCommand(t) args := []string{"-list", "-http-addr=127.0.0.1:0"} code := c.Run(args) @@ -99,6 +103,7 @@ func TestKeyringCommandRun_failedConnection(t *testing.T) { } func TestKeyringCommandRun_invalidRelayFactor(t *testing.T) { + t.Parallel() ui, c := testKeyringCommand(t) args := []string{"-list", "-relay-factor=6"} diff --git a/command/kv_command_test.go b/command/kv_command_test.go index 9509381082..8162eb85ce 100644 --- a/command/kv_command_test.go +++ b/command/kv_command_test.go @@ -7,9 +7,11 @@ import ( ) func TestKVCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KVCommand{} } func TestKVCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(KVCommand)) } diff --git a/command/kv_delete_test.go b/command/kv_delete_test.go index 2cb4dd48ef..aff248ea65 100644 --- a/command/kv_delete_test.go +++ b/command/kv_delete_test.go @@ -22,14 +22,17 @@ func testKVDeleteCommand(t *testing.T) (*cli.MockUi, *KVDeleteCommand) { } func TestKVDeleteCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KVDeleteCommand{} } func TestKVDeleteCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(KVDeleteCommand)) } func TestKVDeleteCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testKVDeleteCommand(t) cases := map[string]struct { @@ -80,6 +83,7 @@ func TestKVDeleteCommand_Validation(t *testing.T) { } func TestKVDeleteCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -115,6 +119,7 @@ func TestKVDeleteCommand_Run(t *testing.T) { } func TestKVDeleteCommand_Recurse(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -157,6 +162,7 @@ func TestKVDeleteCommand_Recurse(t *testing.T) { } func TestKVDeleteCommand_CAS(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/kv_export_test.go b/command/kv_export_test.go index e9f91b399d..db123b10a3 100644 --- a/command/kv_export_test.go +++ b/command/kv_export_test.go @@ -12,6 +12,7 @@ import ( ) func TestKVExportCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/kv_get_test.go b/command/kv_get_test.go index 0c017842a5..035d6f1725 100644 --- a/command/kv_get_test.go +++ b/command/kv_get_test.go @@ -22,14 +22,17 @@ func testKVGetCommand(t *testing.T) (*cli.MockUi, *KVGetCommand) { } func TestKVGetCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KVGetCommand{} } func TestKVGetCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(KVGetCommand)) } func TestKVGetCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testKVGetCommand(t) cases := map[string]struct { @@ -68,6 +71,7 @@ func TestKVGetCommand_Validation(t *testing.T) { } func TestKVGetCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -100,6 +104,7 @@ func TestKVGetCommand_Run(t *testing.T) { } func TestKVGetCommand_Missing(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -117,6 +122,7 @@ func TestKVGetCommand_Missing(t *testing.T) { } func TestKVGetCommand_Empty(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -144,6 +150,7 @@ func TestKVGetCommand_Empty(t *testing.T) { } func TestKVGetCommand_Detailed(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -186,6 +193,7 @@ func TestKVGetCommand_Detailed(t *testing.T) { } func TestKVGetCommand_Keys(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -219,6 +227,7 @@ func TestKVGetCommand_Keys(t *testing.T) { } func TestKVGetCommand_Recurse(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -257,6 +266,7 @@ func TestKVGetCommand_Recurse(t *testing.T) { } func TestKVGetCommand_RecurseBase64(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -296,6 +306,7 @@ func TestKVGetCommand_RecurseBase64(t *testing.T) { } func TestKVGetCommand_DetailedBase64(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/kv_import_test.go b/command/kv_import_test.go index 2d1f9cb479..d4e2dfd2bb 100644 --- a/command/kv_import_test.go +++ b/command/kv_import_test.go @@ -10,6 +10,7 @@ import ( ) func TestKVImportCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/kv_put_test.go b/command/kv_put_test.go index a10d7e3052..84f36f10c6 100644 --- a/command/kv_put_test.go +++ b/command/kv_put_test.go @@ -27,14 +27,17 @@ func testKVPutCommand(t *testing.T) (*cli.MockUi, *KVPutCommand) { } func TestKVPutCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &KVPutCommand{} } func TestKVPutCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(KVDeleteCommand)) } func TestKVPutCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testKVPutCommand(t) cases := map[string]struct { @@ -85,6 +88,7 @@ func TestKVPutCommand_Validation(t *testing.T) { } func TestKVPutCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -112,6 +116,7 @@ func TestKVPutCommand_Run(t *testing.T) { } func TestKVPutCommand_RunEmptyDataQuoted(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -139,6 +144,7 @@ func TestKVPutCommand_RunEmptyDataQuoted(t *testing.T) { } func TestKVPutCommand_RunBase64(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -174,6 +180,7 @@ func TestKVPutCommand_RunBase64(t *testing.T) { } func TestKVPutCommand_File(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -207,6 +214,7 @@ func TestKVPutCommand_File(t *testing.T) { } func TestKVPutCommand_FileNoExist(t *testing.T) { + t.Parallel() ui, c := testKVPutCommand(t) args := []string{ @@ -225,6 +233,7 @@ func TestKVPutCommand_FileNoExist(t *testing.T) { } func TestKVPutCommand_Stdin(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -260,6 +269,7 @@ func TestKVPutCommand_Stdin(t *testing.T) { } func TestKVPutCommand_NegativeVal(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -287,6 +297,7 @@ func TestKVPutCommand_NegativeVal(t *testing.T) { } func TestKVPutCommand_Flags(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() @@ -315,6 +326,7 @@ func TestKVPutCommand_Flags(t *testing.T) { } func TestKVPutCommand_CAS(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/leave_test.go b/command/leave_test.go index b24f656e7d..d9cbb1f72f 100644 --- a/command/leave_test.go +++ b/command/leave_test.go @@ -20,10 +20,12 @@ func testLeaveCommand(t *testing.T) (*cli.MockUi, *LeaveCommand) { } func TestLeaveCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &LeaveCommand{} } func TestLeaveCommandRun(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -41,6 +43,7 @@ func TestLeaveCommandRun(t *testing.T) { } func TestLeaveCommandFailOnNonFlagArgs(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/lock_test.go b/command/lock_test.go index 25513b2a00..332b4e03d8 100644 --- a/command/lock_test.go +++ b/command/lock_test.go @@ -25,6 +25,7 @@ func testLockCommand(t *testing.T) (*cli.MockUi, *LockCommand) { } func TestLockCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &LockCommand{} } @@ -40,12 +41,14 @@ func argFail(t *testing.T, args []string, expected string) { } func TestLockCommand_BadArgs(t *testing.T) { + t.Parallel() argFail(t, []string{"-try=blah", "test/prefix", "date"}, "invalid duration") argFail(t, []string{"-try=-10s", "test/prefix", "date"}, "Timeout must be positive") argFail(t, []string{"-monitor-retry=-5", "test/prefix", "date"}, "must be >= 0") } func TestLockCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -67,6 +70,7 @@ func TestLockCommand_Run(t *testing.T) { } func TestLockCommand_Try_Lock(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -97,6 +101,7 @@ func TestLockCommand_Try_Lock(t *testing.T) { } func TestLockCommand_Try_Semaphore(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -127,6 +132,7 @@ func TestLockCommand_Try_Semaphore(t *testing.T) { } func TestLockCommand_MonitorRetry_Lock_Default(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -158,6 +164,7 @@ func TestLockCommand_MonitorRetry_Lock_Default(t *testing.T) { } func TestLockCommand_MonitorRetry_Semaphore_Default(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -189,6 +196,7 @@ func TestLockCommand_MonitorRetry_Semaphore_Default(t *testing.T) { } func TestLockCommand_MonitorRetry_Lock_Arg(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -220,6 +228,7 @@ func TestLockCommand_MonitorRetry_Lock_Arg(t *testing.T) { } func TestLockCommand_MonitorRetry_Semaphore_Arg(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/maint_test.go b/command/maint_test.go index 43887753a2..92d931792c 100644 --- a/command/maint_test.go +++ b/command/maint_test.go @@ -21,10 +21,12 @@ func testMaintCommand(t *testing.T) (*cli.MockUi, *MaintCommand) { } func TestMaintCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &MaintCommand{} } func TestMaintCommandRun_ConflictingArgs(t *testing.T) { + t.Parallel() _, c := testMaintCommand(t) if code := c.Run([]string{"-enable", "-disable"}); code != 1 { @@ -45,6 +47,7 @@ func TestMaintCommandRun_ConflictingArgs(t *testing.T) { } func TestMaintCommandRun_NoArgs(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -91,6 +94,7 @@ func TestMaintCommandRun_NoArgs(t *testing.T) { } func TestMaintCommandRun_EnableNodeMaintenance(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -112,6 +116,7 @@ func TestMaintCommandRun_EnableNodeMaintenance(t *testing.T) { } func TestMaintCommandRun_DisableNodeMaintenance(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -132,6 +137,7 @@ func TestMaintCommandRun_DisableNodeMaintenance(t *testing.T) { } func TestMaintCommandRun_EnableServiceMaintenance(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -163,6 +169,7 @@ func TestMaintCommandRun_EnableServiceMaintenance(t *testing.T) { } func TestMaintCommandRun_DisableServiceMaintenance(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -193,6 +200,7 @@ func TestMaintCommandRun_DisableServiceMaintenance(t *testing.T) { } func TestMaintCommandRun_ServiceMaintenance_NoService(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/members_test.go b/command/members_test.go index 9f257541f7..64355df968 100644 --- a/command/members_test.go +++ b/command/members_test.go @@ -21,10 +21,12 @@ func testMembersCommand(t *testing.T) (*cli.MockUi, *MembersCommand) { } func TestMembersCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &MembersCommand{} } func TestMembersCommandRun(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -53,6 +55,7 @@ func TestMembersCommandRun(t *testing.T) { } func TestMembersCommandRun_WAN(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -70,6 +73,7 @@ func TestMembersCommandRun_WAN(t *testing.T) { } func TestMembersCommandRun_statusFilter(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() @@ -90,6 +94,7 @@ func TestMembersCommandRun_statusFilter(t *testing.T) { } func TestMembersCommandRun_statusFilter_failed(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/operator_autopilot_get_test.go b/command/operator_autopilot_get_test.go index 7a67a0b5bc..c2ae1eea6a 100644 --- a/command/operator_autopilot_get_test.go +++ b/command/operator_autopilot_get_test.go @@ -10,10 +10,12 @@ import ( ) func TestOperator_Autopilot_Get_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorAutopilotGetCommand{} } func TestOperator_Autopilot_Get(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/operator_autopilot_set_test.go b/command/operator_autopilot_set_test.go index 0951ca5e21..c92b55e0bf 100644 --- a/command/operator_autopilot_set_test.go +++ b/command/operator_autopilot_set_test.go @@ -12,10 +12,12 @@ import ( ) func TestOperator_Autopilot_Set_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorAutopilotSetCommand{} } func TestOperator_Autopilot_Set(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/operator_autopilot_test.go b/command/operator_autopilot_test.go index 6f4adb4a2b..5bff69291c 100644 --- a/command/operator_autopilot_test.go +++ b/command/operator_autopilot_test.go @@ -7,5 +7,6 @@ import ( ) func TestOperator_Autopilot_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorAutopilotCommand{} } diff --git a/command/operator_raft_list_test.go b/command/operator_raft_list_test.go index 78f80a8d22..add7f817c1 100644 --- a/command/operator_raft_list_test.go +++ b/command/operator_raft_list_test.go @@ -11,10 +11,12 @@ import ( ) func TestOperator_Raft_ListPeers_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorRaftListCommand{} } func TestOperator_Raft_ListPeers(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/operator_raft_remove_test.go b/command/operator_raft_remove_test.go index a8f68a286c..fe2ead2cc9 100644 --- a/command/operator_raft_remove_test.go +++ b/command/operator_raft_remove_test.go @@ -10,10 +10,12 @@ import ( ) func TestOperator_Raft_RemovePeer_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorRaftRemoveCommand{} } func TestOperator_Raft_RemovePeer(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/operator_raft_test.go b/command/operator_raft_test.go index fb417b0d11..09b3b343ec 100644 --- a/command/operator_raft_test.go +++ b/command/operator_raft_test.go @@ -18,5 +18,6 @@ func testOperatorRaftCommand(t *testing.T) (*cli.MockUi, *OperatorRaftCommand) { } func TestOperator_Raft_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorRaftCommand{} } diff --git a/command/operator_test.go b/command/operator_test.go index 485f975449..7364a7cfaf 100644 --- a/command/operator_test.go +++ b/command/operator_test.go @@ -7,5 +7,6 @@ import ( ) func TestOperator_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &OperatorCommand{} } diff --git a/command/reload_test.go b/command/reload_test.go index ca6ec6b61a..ad8128ec01 100644 --- a/command/reload_test.go +++ b/command/reload_test.go @@ -10,10 +10,12 @@ import ( ) func TestReloadCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &ReloadCommand{} } func TestReloadCommandRun(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/rtt_test.go b/command/rtt_test.go index e2f91f5e00..755cf9c02e 100644 --- a/command/rtt_test.go +++ b/command/rtt_test.go @@ -25,10 +25,12 @@ func testRTTCommand(t *testing.T) (*cli.MockUi, *RTTCommand) { } func TestRTTCommand_Implements(t *testing.T) { + t.Parallel() var _ cli.Command = &RTTCommand{} } func TestRTTCommand_Run_BadArgs(t *testing.T) { + t.Parallel() _, c := testRTTCommand(t) if code := c.Run([]string{}); code != 1 { @@ -53,6 +55,7 @@ func TestRTTCommand_Run_BadArgs(t *testing.T) { } func TestRTTCommand_Run_LAN(t *testing.T) { + t.Parallel() updatePeriod := 10 * time.Millisecond cfg := agent.TestConfig() cfg.ConsulConfig.CoordinateUpdatePeriod = updatePeriod @@ -154,6 +157,7 @@ func TestRTTCommand_Run_LAN(t *testing.T) { } func TestRTTCommand_Run_WAN(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() diff --git a/command/snapshot_command_test.go b/command/snapshot_command_test.go index 4e0807b56b..391e4b7cda 100644 --- a/command/snapshot_command_test.go +++ b/command/snapshot_command_test.go @@ -7,9 +7,11 @@ import ( ) func TestSnapshotCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &SnapshotCommand{} } func TestSnapshotCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(SnapshotCommand)) } diff --git a/command/snapshot_inspect_test.go b/command/snapshot_inspect_test.go index edca4e5603..1dc7e70c11 100644 --- a/command/snapshot_inspect_test.go +++ b/command/snapshot_inspect_test.go @@ -24,14 +24,17 @@ func testSnapshotInspectCommand(t *testing.T) (*cli.MockUi, *SnapshotInspectComm } func TestSnapshotInspectCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &SnapshotInspectCommand{} } func TestSnapshotInspectCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(SnapshotInspectCommand)) } func TestSnapshotInspectCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testSnapshotInspectCommand(t) cases := map[string]struct { @@ -70,6 +73,7 @@ func TestSnapshotInspectCommand_Validation(t *testing.T) { } func TestSnapshotInspectCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/snapshot_restore_test.go b/command/snapshot_restore_test.go index 61014aa190..c26f178e77 100644 --- a/command/snapshot_restore_test.go +++ b/command/snapshot_restore_test.go @@ -24,14 +24,17 @@ func testSnapshotRestoreCommand(t *testing.T) (*cli.MockUi, *SnapshotRestoreComm } func TestSnapshotRestoreCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &SnapshotRestoreCommand{} } func TestSnapshotRestoreCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(SnapshotRestoreCommand)) } func TestSnapshotRestoreCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testSnapshotRestoreCommand(t) cases := map[string]struct { @@ -70,6 +73,7 @@ func TestSnapshotRestoreCommand_Validation(t *testing.T) { } func TestSnapshotRestoreCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/snapshot_save_test.go b/command/snapshot_save_test.go index 0d4f5fde10..e5ea36104b 100644 --- a/command/snapshot_save_test.go +++ b/command/snapshot_save_test.go @@ -23,14 +23,17 @@ func testSnapshotSaveCommand(t *testing.T) (*cli.MockUi, *SnapshotSaveCommand) { } func TestSnapshotSaveCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &SnapshotSaveCommand{} } func TestSnapshotSaveCommand_noTabs(t *testing.T) { + t.Parallel() assertNoTabs(t, new(SnapshotSaveCommand)) } func TestSnapshotSaveCommand_Validation(t *testing.T) { + t.Parallel() ui, c := testSnapshotSaveCommand(t) cases := map[string]struct { @@ -69,6 +72,7 @@ func TestSnapshotSaveCommand_Validation(t *testing.T) { } func TestSnapshotSaveCommand_Run(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown() client := a.Client() diff --git a/command/validate_test.go b/command/validate_test.go index f44f321396..e251403f84 100644 --- a/command/validate_test.go +++ b/command/validate_test.go @@ -22,10 +22,12 @@ func testValidateCommand(t *testing.T) (*cli.MockUi, *ValidateCommand) { } func TestValidateCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &ValidateCommand{} } func TestValidateCommandFailOnEmptyFile(t *testing.T) { + t.Parallel() tmpFile := testutil.TempFile(t, "consul") defer os.RemoveAll(tmpFile.Name()) @@ -39,6 +41,7 @@ func TestValidateCommandFailOnEmptyFile(t *testing.T) { } func TestValidateCommandSucceedOnEmptyDir(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -52,6 +55,7 @@ func TestValidateCommandSucceedOnEmptyDir(t *testing.T) { } func TestValidateCommandSucceedOnMinimalConfigFile(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -71,6 +75,7 @@ func TestValidateCommandSucceedOnMinimalConfigFile(t *testing.T) { } func TestValidateCommandSucceedOnMinimalConfigDir(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -89,6 +94,7 @@ func TestValidateCommandSucceedOnMinimalConfigDir(t *testing.T) { } func TestValidateCommandSucceedOnConfigDirWithEmptyFile(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) @@ -107,6 +113,7 @@ func TestValidateCommandSucceedOnConfigDirWithEmptyFile(t *testing.T) { } func TestValidateCommandQuiet(t *testing.T) { + t.Parallel() td := testutil.TempDir(t, "consul") defer os.RemoveAll(td) diff --git a/command/version_test.go b/command/version_test.go index 2a645690fa..07af3a0069 100644 --- a/command/version_test.go +++ b/command/version_test.go @@ -7,5 +7,6 @@ import ( ) func TestVersionCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &VersionCommand{} } diff --git a/command/watch_test.go b/command/watch_test.go index b936325e9a..9fc8e254ce 100644 --- a/command/watch_test.go +++ b/command/watch_test.go @@ -10,10 +10,12 @@ import ( ) func TestWatchCommand_implements(t *testing.T) { + t.Parallel() var _ cli.Command = &WatchCommand{} } func TestWatchCommandRun(t *testing.T) { + t.Parallel() a := agent.NewTestAgent(t.Name(), nil) defer a.Shutdown()