Skip to content

Commit

Permalink
Print the expected char with the default output
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Feb 24, 2023
1 parent 26ec301 commit 9e0be1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/tests/cmd_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestSimpleTestStdin(t *testing.T) {
cmd.ExecuteWithGlobalState(ts.GlobalState)

stdout := ts.Stdout.String()
assert.Contains(t, stdout, "output: -")
assert.Contains(t, stdout, "default: 1 iterations for each of 1 VUs")
assert.Contains(t, stdout, "1 complete and 0 interrupted iterations")
assert.Empty(t, ts.Stderr.Bytes())
Expand Down
2 changes: 0 additions & 2 deletions cmd/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ func printExecutionDescription(
switch {
case outputOverride != "":
outputDescriptions = []string{outputOverride}
case len(outputs) == 0:
outputDescriptions = []string{"-"}
default:
for _, out := range outputs {
outputDescriptions = append(outputDescriptions, out.Description())
Expand Down
6 changes: 5 additions & 1 deletion metrics/engine/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ type outputIngester struct {

// Description returns a human-readable description of the output.
func (oi *outputIngester) Description() string {
return "engine"
// It is used in the print banner to make visible
// that no output has been set from the user so the default output is used.
// It keeps things simple but changing this value breaks the cmd/ui.
// If decoupling is required then address the change in cmd/ui also.
return "-"
}

// Start the engine by initializing a new output.PeriodicFlusher
Expand Down

0 comments on commit 9e0be1b

Please sign in to comment.