mirror of https://github.com/status-im/consul.git
commands: add missing noTabs test
This commit is contained in:
parent
84a82cff3d
commit
e5d08cf47d
|
@ -25,6 +25,13 @@ func argFail(t *testing.T, args []string, expected string) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestLockCommand_noTabs(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
|
||||||
|
t.Fatal("usage has tabs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestLockCommand_BadArgs(t *testing.T) {
|
func TestLockCommand_BadArgs(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
argFail(t, []string{"-try=blah", "test/prefix", "date"}, "invalid duration")
|
argFail(t, []string{"-try=blah", "test/prefix", "date"}, "invalid duration")
|
||||||
|
|
|
@ -9,6 +9,13 @@ import (
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestMaintCommand_noTabs(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
|
||||||
|
t.Fatal("usage has tabs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestMaintCommand_ConflictingArgs(t *testing.T) {
|
func TestMaintCommand_ConflictingArgs(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
ui := cli.NewMockUi()
|
ui := cli.NewMockUi()
|
||||||
|
|
|
@ -9,6 +9,13 @@ import (
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestMembersCommand_noTabs(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
|
||||||
|
t.Fatal("usage has tabs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestMembersCommand(t *testing.T) {
|
func TestMembersCommand(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := agent.NewTestAgent(t.Name(), ``)
|
a := agent.NewTestAgent(t.Name(), ``)
|
||||||
|
|
|
@ -8,6 +8,13 @@ import (
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestWatchCommand_noTabs(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
if strings.ContainsRune(New(cli.NewMockUi(), nil).Help(), '\t') {
|
||||||
|
t.Fatal("usage has tabs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestWatchCommand(t *testing.T) {
|
func TestWatchCommand(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := agent.NewTestAgent(t.Name(), ``)
|
a := agent.NewTestAgent(t.Name(), ``)
|
||||||
|
|
Loading…
Reference in New Issue