Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Sep 15, 2023
1 parent c24d978 commit aaa87fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions command/debug/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ func TestDebugCommand_WithSinceFlag(t *testing.T) {
t.Skip("too slow for testing.Short")
}

server, err := testutil.NewTestServerConfigT(t, nil)
require.NoError(t, err)
a := agent.NewTestAgent(t, `
enable_debug = true
`)

server.WaitForLeader(t)
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

ui := cli.NewMockUi()
cmd := New(ui)
Expand All @@ -113,6 +115,8 @@ func TestDebugCommand_WithSinceFlag(t *testing.T) {
"-since=1m",
}

t.Setenv("CONSUL_HTTP_ADDR", a.HTTPAddr())

code := cmd.Run(args)
require.Equal(t, 0, code)
require.Equal(t, "", ui.ErrorWriter.String())
Expand Down

0 comments on commit aaa87fb

Please sign in to comment.