Skip to content

Commit

Permalink
Add comment to status getHealth function
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocabanas committed Aug 20, 2024
1 parent f79dc59 commit b08c05e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/agent/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func (r *nrReporter) ReportHealth() HealthReport {
return r.getHealth(agentID)
}

// Make a http req to the command api to validate the ingest key is valid and connectivity is ok

Check failure on line 186 in internal/agent/status/status.go

View workflow job for this annotation

GitHub Actions / linter-linux / Run Linter

Comment should end in a period (godot)

Check failure on line 186 in internal/agent/status/status.go

View workflow job for this annotation

GitHub Actions / linter-macos / Lint tests

Comment should end in a period (godot)

Check failure on line 186 in internal/agent/status/status.go

View workflow job for this annotation

GitHub Actions / linter-windows / Lint tests

Comment should end in a period (godot)
func (r *nrReporter) getHealth(agentID string) HealthReport {
health, err := backendhttp.CheckEndpointHealthiness(
r.ctx,
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/status/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func TestNewReporter_ReportHealth(t *testing.T) {
defer serverOk.Close()

serverTimeout := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
time.Sleep(10 * time.Second)
time.Sleep(100 * time.Millisecond)
}))
defer serverTimeout.Close()

Expand Down

0 comments on commit b08c05e

Please sign in to comment.