Skip to content

Commit

Permalink
PMM-12857 fix auth_test and clean up readyz_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Jul 2, 2024
1 parent bacf332 commit 089f0a5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api-tests/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func init() {
// do not run tests if server is not available
_, err = serverClient.Default.ServerService.Readiness(nil)
if err != nil {
panic(err)
logrus.Fatalf("Failed to pass the server readiness probe: %s", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion api-tests/management/haproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func TestRemoveHAProxy(t *testing.T) {
defer pmmapitests.RemoveServices(t, serviceID)
}

// Check that the service removed with agents.
// Check that the service was removed with agents.
listAgents, err := inventoryClient.Default.AgentsService.ListAgents(&agents.ListAgentsParams{
Context: pmmapitests.Context,
ServiceID: pointer.ToString(serviceID),
Expand Down
2 changes: 1 addition & 1 deletion api-tests/server/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestSetup(t *testing.T) {
"swagger/": 301,

"v1/server/readyz": 200,
"v1/server/AWSInstance": 501, // It must accept a parameter
"v1/server/AWSInstance": 400, // It must accept a parameter
"v1/server/version": 401, // Grafana authentication required
}
for path, code := range paths {
Expand Down
3 changes: 0 additions & 3 deletions api-tests/server/readyz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func TestReadyz(t *testing.T) {
"v1/server/readyz",
}
for _, path := range paths {
path := path
t.Run(path, func(t *testing.T) {
t.Parallel()

Expand All @@ -47,8 +46,6 @@ func TestReadyz(t *testing.T) {
Path: path,
})

t.Logf("URI: %s", uri)

req, _ := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil)
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
Expand Down

0 comments on commit 089f0a5

Please sign in to comment.