Skip to content

Commit

Permalink
Merge pull request #116 from grafana/feature/description-cleanup
Browse files Browse the repository at this point in the history
fix: remove redundant IP address from description
  • Loading branch information
szkiba authored Dec 18, 2023
2 parents 6e18fb7 + 757569f commit 6a4cbea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dashboard/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (ext *extension) Description() string {
return ext.name
}

return fmt.Sprintf("%s (%s) %s", ext.name, ext.options.addr(), ext.options.url())
return fmt.Sprintf("%s %s", ext.name, ext.options.url())
}

// SetThresholds saves thresholds provided by k6 runtime.
Expand Down
4 changes: 2 additions & 2 deletions dashboard/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestNewExtension(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, ext)

assert.Equal(t, "dashboard (localhost:1) http://localhost:1", ext.Description())
assert.Equal(t, "dashboard http://localhost:1", ext.Description())

params.ConfigArgument = "period=2"

Expand Down Expand Up @@ -179,7 +179,7 @@ func TestExtension_random_port(t *testing.T) {

assert.Equal(
t,
fmt.Sprintf("foo (%s) %s", dashboard.options.addr(), dashboard.options.url()),
fmt.Sprintf("foo %s", dashboard.options.url()),
ext.Description(),
)

Expand Down

0 comments on commit 6a4cbea

Please sign in to comment.