Controlling the test summary/output in go

Viewed 28

Go tests provide output telling you which tests are being run and what the results are. EG

=== RUN   SomeTest
--- PASS: SomeTest (0.00s)

Obviously that one is a fast test :)

I'm running these tests automatically in a lambda on AWS. I want to be able to search for the log output of an entire test run based on a requestid - eg: the lambda request id or a request id I supply myself.

Commonly this is done for logs using a prefix on all log lines. However I see no way of configuring the go test output to use a prefix. Is this currently possible?

What I'd like!

[request-id]    === RUN   SomeTest
[request-id]    --- PASS: SomeTest (0.00s)
0 Answers
Related