Fix test ordering (#14543)
This commit is contained in:
parent
1ae31a520a
commit
b52b0f6be7
|
@ -65,6 +65,21 @@ func TestListCommand(t *testing.T) {
|
|||
require.Contains(t, output, "no peering connections")
|
||||
})
|
||||
|
||||
t.Run("no results - json", func(t *testing.T) {
|
||||
ui := cli.NewMockUi()
|
||||
cmd := New(ui)
|
||||
|
||||
args := []string{
|
||||
"-http-addr=" + acceptor.HTTPAddr(),
|
||||
"-format=json",
|
||||
}
|
||||
|
||||
code := cmd.Run(args)
|
||||
require.Equal(t, 0, code)
|
||||
output := ui.OutputWriter.String()
|
||||
require.Contains(t, output, "[]")
|
||||
})
|
||||
|
||||
t.Run("two results for pretty print", func(t *testing.T) {
|
||||
|
||||
generateReq := api.PeeringGenerateTokenRequest{PeerName: "foo"}
|
||||
|
@ -94,21 +109,6 @@ func TestListCommand(t *testing.T) {
|
|||
require.Contains(t, lines[2], "foo")
|
||||
})
|
||||
|
||||
t.Run("no results - json", func(t *testing.T) {
|
||||
ui := cli.NewMockUi()
|
||||
cmd := New(ui)
|
||||
|
||||
args := []string{
|
||||
"-http-addr=" + acceptor.HTTPAddr(),
|
||||
"-format=json",
|
||||
}
|
||||
|
||||
code := cmd.Run(args)
|
||||
require.Equal(t, 0, code)
|
||||
output := ui.OutputWriter.String()
|
||||
require.Contains(t, output, "[]")
|
||||
})
|
||||
|
||||
t.Run("two results for JSON print", func(t *testing.T) {
|
||||
|
||||
ui := cli.NewMockUi()
|
||||
|
|
Loading…
Reference in New Issue