secrets-manager
secrets-manager copied to clipboard
Add `-gcflags=all=-l` flag to the unit test execution
Describe the bug
Since monkey patching is used for some unit tests, we need to be aware of the note that the gomonkey library put on their readme file, which is about running unit tests with the -gcflags=all=-l flag. It's because "gomonkey fails to patch a function or a member method if inlining is enabled"
To Reproduce Steps to reproduce the behavior:
- Running tests for arm64 machines may cause the issue.
- Filesystem-related operations in the unit tests mostly fail because of a sigbus error for arm64 machines.
Expected behavior Consistent test results for all supported architectures.