commands: cleanup test names

This commit is contained in:
Frank Schroeder 2017-10-17 14:04:51 +02:00 committed by Frank Schröder
parent 0e059248e7
commit a6d912adb4
29 changed files with 59 additions and 59 deletions

View File

@ -51,7 +51,7 @@ func TestCatalogListDatacentersCommand_Validation(t *testing.T) {
}
}
func TestCatalogListDatacentersCommand_Run(t *testing.T) {
func TestCatalogListDatacentersCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -29,7 +29,7 @@ func TestCatalogListNodesCommand_Validation(t *testing.T) {
}
}
func TestCatalogListNodesCommand_Run(t *testing.T) {
func TestCatalogListNodesCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -30,7 +30,7 @@ func TestCatalogListServicesCommand_Validation(t *testing.T) {
}
}
func TestCatalogListServicesCommand_Run(t *testing.T) {
func TestCatalogListServicesCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -14,7 +14,7 @@ func TestEventCommand_noTabs(t *testing.T) {
}
}
func TestEventCommandRun(t *testing.T) {
func TestEventCommand(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), ``)
defer a1.Shutdown()

View File

@ -17,7 +17,7 @@ func TestExecCommand_noTabs(t *testing.T) {
}
}
func TestExecCommandRun(t *testing.T) {
func TestExecCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), `
disable_remote_exec = false
@ -38,7 +38,7 @@ func TestExecCommandRun(t *testing.T) {
}
}
func TestExecCommandRun_NoShell(t *testing.T) {
func TestExecCommand_NoShell(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), `
disable_remote_exec = false
@ -59,7 +59,7 @@ func TestExecCommandRun_NoShell(t *testing.T) {
}
}
func TestExecCommandRun_CrossDC(t *testing.T) {
func TestExecCommand_CrossDC(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), `
disable_remote_exec = false

View File

@ -17,7 +17,7 @@ func TestForceLeaveCommand_noTabs(t *testing.T) {
}
}
func TestForceLeaveCommandRun(t *testing.T) {
func TestForceLeaveCommand(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), ``)
a2 := agent.NewTestAgent(t.Name(), ``)
@ -56,7 +56,7 @@ func TestForceLeaveCommandRun(t *testing.T) {
})
}
func TestForceLeaveCommandRun_noAddrs(t *testing.T) {
func TestForceLeaveCommand_noAddrs(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
c := New(ui)

View File

@ -14,7 +14,7 @@ func TestInfoCommand_noTabs(t *testing.T) {
}
}
func TestInfoCommandRun(t *testing.T) {
func TestInfoCommand(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), ``)
defer a1.Shutdown()

View File

@ -14,7 +14,7 @@ func TestJoinCommand_noTabs(t *testing.T) {
}
}
func TestJoinCommandJoinRun_lan(t *testing.T) {
func TestJoinCommandJoin_lan(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), ``)
a2 := agent.NewTestAgent(t.Name(), ``)
@ -38,7 +38,7 @@ func TestJoinCommandJoinRun_lan(t *testing.T) {
}
}
func TestJoinCommandRun_wan(t *testing.T) {
func TestJoinCommand_wan(t *testing.T) {
t.Parallel()
a1 := agent.NewTestAgent(t.Name(), ``)
a2 := agent.NewTestAgent(t.Name(), ``)
@ -63,7 +63,7 @@ func TestJoinCommandRun_wan(t *testing.T) {
}
}
func TestJoinCommandRun_noAddrs(t *testing.T) {
func TestJoinCommand_noAddrs(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
cmd := New(ui)

View File

@ -15,7 +15,7 @@ func TestKeyringCommand_noTabs(t *testing.T) {
}
}
func TestKeyringCommandRun(t *testing.T) {
func TestKeyringCommand(t *testing.T) {
t.Parallel()
key1 := "HS5lJ+XuTlYKWaeGYyG+/A=="
key2 := "kZyFABeAmc64UMTrm9XuKA=="
@ -66,7 +66,7 @@ func TestKeyringCommandRun(t *testing.T) {
}
}
func TestKeyringCommandRun_help(t *testing.T) {
func TestKeyringCommand_help(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
c := New(ui)
@ -81,7 +81,7 @@ func TestKeyringCommandRun_help(t *testing.T) {
}
}
func TestKeyringCommandRun_failedConnection(t *testing.T) {
func TestKeyringCommand_failedConnection(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
c := New(ui)
@ -95,7 +95,7 @@ func TestKeyringCommandRun_failedConnection(t *testing.T) {
}
}
func TestKeyringCommandRun_invalidRelayFactor(t *testing.T) {
func TestKeyringCommand_invalidRelayFactor(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
c := New(ui)

View File

@ -70,7 +70,7 @@ func TestKVDeleteCommand_Validation(t *testing.T) {
}
}
func TestKVDeleteCommand_Run(t *testing.T) {
func TestKVDeleteCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -19,7 +19,7 @@ func TestKVExportCommand_noTabs(t *testing.T) {
}
}
func TestKVExportCommand_Run(t *testing.T) {
func TestKVExportCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -57,7 +57,7 @@ func TestKVGetCommand_Validation(t *testing.T) {
}
}
func TestKVGetCommand_Run(t *testing.T) {
func TestKVGetCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -15,7 +15,7 @@ func TestKVImportCommand_noTabs(t *testing.T) {
}
}
func TestKVImportCommand_Run(t *testing.T) {
func TestKVImportCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -75,7 +75,7 @@ func TestKVPutCommand_Validation(t *testing.T) {
}
}
func TestKVPutCommand_Run(t *testing.T) {
func TestKVPutCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -104,7 +104,7 @@ func TestKVPutCommand_Run(t *testing.T) {
}
}
func TestKVPutCommand_RunEmptyDataQuoted(t *testing.T) {
func TestKVPutCommand_EmptyDataQuoted(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -133,7 +133,7 @@ func TestKVPutCommand_RunEmptyDataQuoted(t *testing.T) {
}
}
func TestKVPutCommand_RunBase64(t *testing.T) {
func TestKVPutCommand_Base64(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -15,7 +15,7 @@ func TestLeaveCommand_noTabs(t *testing.T) {
}
}
func TestLeaveCommandRun(t *testing.T) {
func TestLeaveCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -34,7 +34,7 @@ func TestLeaveCommandRun(t *testing.T) {
}
}
func TestLeaveCommandFailOnNonFlagArgs(t *testing.T) {
func TestLeaveCommand_FailOnNonFlagArgs(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -32,7 +32,7 @@ func TestLockCommand_BadArgs(t *testing.T) {
argFail(t, []string{"-monitor-retry=-5", "test/prefix", "date"}, "must be >= 0")
}
func TestLockCommand_Run(t *testing.T) {
func TestLockCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -55,7 +55,7 @@ func TestLockCommand_Run(t *testing.T) {
}
}
func TestLockCommand_Run_NoShell(t *testing.T) {
func TestLockCommand_NoShell(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -78,7 +78,7 @@ func TestLockCommand_Run_NoShell(t *testing.T) {
}
}
func TestLockCommand_Try_Lock(t *testing.T) {
func TestLockCommand_TryLock(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -110,7 +110,7 @@ func TestLockCommand_Try_Lock(t *testing.T) {
}
}
func TestLockCommand_Try_Semaphore(t *testing.T) {
func TestLockCommand_TrySemaphore(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -9,7 +9,7 @@ import (
"github.com/mitchellh/cli"
)
func TestMaintCommandRun_ConflictingArgs(t *testing.T) {
func TestMaintCommand_ConflictingArgs(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()
c := New(ui)
@ -32,7 +32,7 @@ func TestMaintCommandRun_ConflictingArgs(t *testing.T) {
}
}
func TestMaintCommandRun_NoArgs(t *testing.T) {
func TestMaintCommand_NoArgs(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -81,7 +81,7 @@ func TestMaintCommandRun_NoArgs(t *testing.T) {
}
}
func TestMaintCommandRun_EnableNodeMaintenance(t *testing.T) {
func TestMaintCommand_EnableNodeMaintenance(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -105,7 +105,7 @@ func TestMaintCommandRun_EnableNodeMaintenance(t *testing.T) {
}
}
func TestMaintCommandRun_DisableNodeMaintenance(t *testing.T) {
func TestMaintCommand_DisableNodeMaintenance(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -128,7 +128,7 @@ func TestMaintCommandRun_DisableNodeMaintenance(t *testing.T) {
}
}
func TestMaintCommandRun_EnableServiceMaintenance(t *testing.T) {
func TestMaintCommand_EnableServiceMaintenance(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -162,7 +162,7 @@ func TestMaintCommandRun_EnableServiceMaintenance(t *testing.T) {
}
}
func TestMaintCommandRun_DisableServiceMaintenance(t *testing.T) {
func TestMaintCommand_DisableServiceMaintenance(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -195,7 +195,7 @@ func TestMaintCommandRun_DisableServiceMaintenance(t *testing.T) {
}
}
func TestMaintCommandRun_ServiceMaintenance_NoService(t *testing.T) {
func TestMaintCommand_ServiceMaintenance_NoService(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -9,7 +9,7 @@ import (
"github.com/mitchellh/cli"
)
func TestMembersCommandRun(t *testing.T) {
func TestMembersCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -41,7 +41,7 @@ func TestMembersCommandRun(t *testing.T) {
}
}
func TestMembersCommandRun_WAN(t *testing.T) {
func TestMembersCommand_WAN(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -62,7 +62,7 @@ func TestMembersCommandRun_WAN(t *testing.T) {
}
}
func TestMembersCommandRun_statusFilter(t *testing.T) {
func TestMembersCommand_statusFilter(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()
@ -86,7 +86,7 @@ func TestMembersCommandRun_statusFilter(t *testing.T) {
}
}
func TestMembersCommandRun_statusFilter_failed(t *testing.T) {
func TestMembersCommand_statusFilter_failed(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -8,14 +8,14 @@ import (
"github.com/mitchellh/cli"
)
func TestOperatorAutopilotGetCommand_noTabs(t *testing.T) {
func TestOperatorAutopilotGetConfigCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestOperator_Autopilot_Get(t *testing.T) {
func TestOperatorAutopilotGetConfigCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -10,14 +10,14 @@ import (
"github.com/mitchellh/cli"
)
func TestOperatorAutopilotSetCommand_noTabs(t *testing.T) {
func TestOperatorAutopilotSetConfigCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestOperator_Autopilot_Set(t *testing.T) {
func TestOperatorAutopilotSetConfigCommmand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -16,7 +16,7 @@ func TestOperatorRaftListPeersCommand_noTabs(t *testing.T) {
}
}
func TestOperatorRaftListPeersCommandRun(t *testing.T) {
func TestOperatorRaftListPeersCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -15,7 +15,7 @@ func TestOperatorRaftRemovePeerCommand_noTabs(t *testing.T) {
}
}
func TestOperator_Raft_RemovePeer(t *testing.T) {
func TestOperatorRaftRemovePeerCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -15,7 +15,7 @@ func TestReloadCommand_noTabs(t *testing.T) {
}
}
func TestReloadCommandRun(t *testing.T) {
func TestReloadCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -19,7 +19,7 @@ func TestRTTCommand_noTabs(t *testing.T) {
}
}
func TestRTTCommand_Run_BadArgs(t *testing.T) {
func TestRTTCommand_BadArgs(t *testing.T) {
t.Parallel()
tests := []struct {
args []string
@ -43,7 +43,7 @@ func TestRTTCommand_Run_BadArgs(t *testing.T) {
}
}
func TestRTTCommand_Run_LAN(t *testing.T) {
func TestRTTCommand_LAN(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), `
consul = {
@ -151,7 +151,7 @@ func TestRTTCommand_Run_LAN(t *testing.T) {
}
}
func TestRTTCommand_Run_WAN(t *testing.T) {
func TestRTTCommand_WAN(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -59,7 +59,7 @@ func TestSnapshotInspectCommand_Validation(t *testing.T) {
}
}
func TestSnapshotInspectCommand_Run(t *testing.T) {
func TestSnapshotInspectCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -59,7 +59,7 @@ func TestSnapshotRestoreCommand_Validation(t *testing.T) {
}
}
func TestSnapshotRestoreCommand_Run(t *testing.T) {
func TestSnapshotRestoreCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -58,7 +58,7 @@ func TestSnapshotSaveCommand_Validation(t *testing.T) {
}
}
func TestSnapshotSaveCommand_Run(t *testing.T) {
func TestSnapshotSaveCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()

View File

@ -17,7 +17,7 @@ func TestValidateCommand_noTabs(t *testing.T) {
}
}
func TestValidateCommandFailOnEmptyFile(t *testing.T) {
func TestValidateCommand_FailOnEmptyFile(t *testing.T) {
t.Parallel()
tmpFile := testutil.TempFile(t, "consul")
defer os.RemoveAll(tmpFile.Name())
@ -30,7 +30,7 @@ func TestValidateCommandFailOnEmptyFile(t *testing.T) {
}
}
func TestValidateCommandSucceedOnMinimalConfigFile(t *testing.T) {
func TestValidateCommand_SucceedOnMinimalConfigFile(t *testing.T) {
td := testutil.TempDir(t, "consul")
defer os.RemoveAll(td)
@ -48,7 +48,7 @@ func TestValidateCommandSucceedOnMinimalConfigFile(t *testing.T) {
}
}
func TestValidateCommandSucceedOnMinimalConfigDir(t *testing.T) {
func TestValidateCommand_SucceedOnMinimalConfigDir(t *testing.T) {
td := testutil.TempDir(t, "consul")
defer os.RemoveAll(td)
@ -65,7 +65,7 @@ func TestValidateCommandSucceedOnMinimalConfigDir(t *testing.T) {
}
}
func TestValidateCommandQuiet(t *testing.T) {
func TestValidateCommand_Quiet(t *testing.T) {
t.Parallel()
td := testutil.TempDir(t, "consul")
defer os.RemoveAll(td)

View File

@ -8,7 +8,7 @@ import (
"github.com/mitchellh/cli"
)
func TestWatchCommandRun(t *testing.T) {
func TestWatchCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
defer a.Shutdown()