Skip to content

Commit

Permalink
output_test: add missing metrics to expectations (bis)
Browse files Browse the repository at this point in the history
  • Loading branch information
roobre committed Nov 13, 2024
1 parent 1ab37f2 commit 8978e27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ func TestTargetMetricsCollectionWriteOne(t *testing.T) {
}

func TestTargetMetricsCollectionWriteMany(t *testing.T) {
t.Skip("Skiping broken test")

t.Parallel()

c := newTargetMetricsCollection()
Expand Down Expand Up @@ -605,6 +603,8 @@ func TestTargetMetricsCollectionWriteMany(t *testing.T) {
c.Write(&buf)

expected := joinNewline(
`probe_http_got_expected_response{url="http://example.com",method="GET",scenario="s",group="g"} 1`,
`probe_http_error_code{url="http://example.com",method="GET",scenario="s",group="g"} 0`,
`probe_http_info{tls_version="1.3",proto="1.1",k="v",url="http://example.com",method="GET",scenario="s",group="g"} 1`,
`probe_http_requests_total{url="http://example.com",method="GET",scenario="s",group="g"} 2`,
`probe_http_requests_failed_total{url="http://example.com",method="GET",scenario="s",group="g"} 1`,
Expand Down Expand Up @@ -636,6 +636,11 @@ func TestTargetMetricsCollectionWriteMany(t *testing.T) {
`probe_http_duration_seconds{phase="transfer",url="http://example.com",method="GET",scenario="s",group="g"} 0.001`,
`probe_http_duration_seconds_count{phase="transfer",url="http://example.com",method="GET",scenario="s",group="g"} 2`,
`probe_http_duration_seconds_sum{phase="transfer",url="http://example.com",method="GET",scenario="s",group="g"} 0.002`,
`probe_http_total_duration_seconds_min{url="http://example.com",method="GET",scenario="s",group="g"} 0.001`,
`probe_http_total_duration_seconds_max{url="http://example.com",method="GET",scenario="s",group="g"} 0.001`,
`probe_http_total_duration_seconds{url="http://example.com",method="GET",scenario="s",group="g"} 0.001`,
`probe_http_total_duration_seconds_count{url="http://example.com",method="GET",scenario="s",group="g"} 2`,
`probe_http_total_duration_seconds_sum{url="http://example.com",method="GET",scenario="s",group="g"} 0.002`,
)

require.Equal(t, expected, buf.String())
Expand Down

0 comments on commit 8978e27

Please sign in to comment.