Skip to content

Commit

Permalink
fix missing import / lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
davemay99 committed Nov 24, 2020
1 parent 5302584 commit 9685b84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion command/operator_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (

"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/helper"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/posener/complete"
)

Expand Down Expand Up @@ -675,7 +677,7 @@ func (c *OperatorDebugCommand) collectPeriodic(client *api.Client) {
c.collectNomad(dir, client)
c.collectOperator(dir, client)
interval = time.After(c.interval)
intervalCount += 1
intervalCount++

case <-c.ctx.Done():
return
Expand Down
3 changes: 2 additions & 1 deletion command/operator_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ func TestDebugFail_Pprof(t *testing.T) {
code := cmd.Run([]string{"-address", url, "-duration", "250ms", "-server-id", "all"})

assert.Equal(t, 0, code) // Pprof failure isn't fatal
require.Contains(t, ui.ErrorWriter.String(), "Failed to retrieve pprof profile.prof")
require.Contains(t, ui.ErrorWriter.String(), "Failed to retrieve pprof")
require.Contains(t, ui.ErrorWriter.String(), "Permission denied")
require.Contains(t, ui.OutputWriter.String(), "Starting debugger")
require.Contains(t, ui.OutputWriter.String(), "Created debug archive")

Expand Down

0 comments on commit 9685b84

Please sign in to comment.