Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mdatagen] bugfix: fix generated package test when skipping goleak, b…
…ecause os package import is forgotten (#10486) #### Description When `tests.goleak.skip` flag is set to true, the generated_package_test.go is missing the `import os` statement. I added the missing import in this PR. #### Testing Compare the generated generated_package_test.go when tests.goleak.skip flag is toggle from false to true. **before** ```diff --- a/receiver/runnreceiver/generated_package_test.go +++ b/receiver/runnreceiver/generated_package_test.go @@ -3,10 +3,10 @@ package runnreceiver import ( - "go.uber.org/goleak" "testing" ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + // skipping goleak test as per metadata.yml configuration + os.Exit(m.Run()) } ``` **after** ```diff --- a/receiver/runnreceiver/generated_package_test.go +++ b/receiver/runnreceiver/generated_package_test.go @@ -3,10 +3,11 @@ package runnreceiver import ( - "go.uber.org/goleak" + "os" "testing" ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + // skipping goleak test as per metadata.yml configuration + os.Exit(m.Run()) } ```
- Loading branch information