Skip to content

Commit

Permalink
Fix integration tests for pushgateway changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Jul 4, 2024
1 parent 510b9eb commit 7c45066
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions internal/http/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,9 @@ func TestIntegration(t *testing.T) {
// delete 2 first metrics by name

DeletePushgatewayMetrics := testCase{
url: "/api/v1/pushgateway",
url: fmt.Sprintf("/api/v1/pushgateway/%s", pushgatewayMetricInput.Name),
expectedStatus: 200,
payload: client.DeletePushgatewayMetricInput{
Identifier: pushgatewayMetricInput.Name,
},
method: "DELETE",
method: "DELETE",
headers: map[string]string{
"Authorization": basicAuth(testUser, testPassword),
},
Expand All @@ -775,12 +772,9 @@ func TestIntegration(t *testing.T) {
// delete by ID

DeletePushgatewayMetrics = testCase{
url: "/api/v1/pushgateway",
url: fmt.Sprintf("/api/v1/pushgateway/%s", listMetricsResult.Result[0].ID),
expectedStatus: 200,
payload: client.DeletePushgatewayMetricInput{
Identifier: listMetricsResult.Result[0].ID,
},
method: "DELETE",
method: "DELETE",
headers: map[string]string{
"Authorization": basicAuth(testUser, testPassword),
},
Expand Down Expand Up @@ -877,8 +871,8 @@ func TestIntegration(t *testing.T) {
},
{
url: "/api/v1/pushgateway",
expectedStatus: 400,
body: "Field validation for",
expectedStatus: 404,
body: "Not Found",
method: "DELETE",
headers: map[string]string{
"Authorization": basicAuth(testUser, testPassword),
Expand Down

0 comments on commit 7c45066

Please sign in to comment.