You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tests for receiver/hostmetricsreceiver locally, I consistently get a failure in receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go on lines 179 and 180:
@jade-guiton-dd can you run the tests as sudo and see if they work?
They're failing if you run with a "normal" user, most probably due to insufficient permissions.
EDIT: Tried the same on my Mac and the tests work with sudo
@VihasMakwana You're right, running the tests as root works.
Is this expected behavior? If yes, it may be nice to document it (if it isn't already), and/or change test expectations depending on the current user, since I doubt most devs would run local tests as root by default.
Component(s)
receiver/hostmetrics
What happened?
Description
When running the tests for
receiver/hostmetricsreceiver
locally, I consistently get a failure inreceiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go
on lines 179 and 180:I suspect this may be an OS-dependent issue.
Steps to Reproduce
Run
go test
inreceiver/hostmetricsreceiver
.Expected Result
Tests pass.
Actual Result
Tests fail.
Collector version
Latest main (75ceb55)
Environment information
Environment
OS: macOS Sonoma 14.7.1 (on M3 hardware)
Compiler: go 1.22.9
Log output
The following output is repeated many times:
The text was updated successfully, but these errors were encountered: