mirror of
https://github.com/TwiN/gatus.git
synced 2025-06-20 17:57:44 +02:00
test(chart): Improve coverage for response time charts
This commit is contained in:
parent
df719958cf
commit
daf8e3a16f
@ -140,6 +140,16 @@ func TestBadge(t *testing.T) {
|
|||||||
Path: "/api/v1/endpoints/core_backend/response-times/24h/chart.svg",
|
Path: "/api/v1/endpoints/core_backend/response-times/24h/chart.svg",
|
||||||
ExpectedCode: http.StatusOK,
|
ExpectedCode: http.StatusOK,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "chart-response-time-7d",
|
||||||
|
Path: "/api/v1/endpoints/core_frontend/response-times/7d/chart.svg",
|
||||||
|
ExpectedCode: http.StatusOK,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "chart-response-time-with-invalid-duration",
|
||||||
|
Path: "/api/v1/endpoints/core_backend/response-times/3d/chart.svg",
|
||||||
|
ExpectedCode: http.StatusBadRequest,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, scenario := range scenarios {
|
for _, scenario := range scenarios {
|
||||||
t.Run(scenario.Name, func(t *testing.T) {
|
t.Run(scenario.Name, func(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user