Closed akojo closed 2 years ago
@akojo Would you mind taking a look at this issue? I don't own a MacOS.
Yep, I'll take a stab at rewriting the offending tests so that they don't use gomonkey
. Though that means I have to also rewrite part of the feature to make it testable without monkey patching.
Thanks.
Unfortunately, I can't reproduce it on macOS Monterey 12.3.1.
$ go version go version go1.18.1 darwin/amd64
$ go version go version go1.17.6 darwin/amd64
I'm guessing it only affects arm64
macs. I'm working on a PR that fixes the issue. Took me a while because I got a bit carried away while refactoring the code 😄
Describe the bug Since macOS doesn't allow writing to text section of programs, trying to use
gomonkey
will panic.To Reproduce Steps to reproduce the behavior:
make test
Expected behavior Tests succeed
Your swag version
master
Your go version 1.17.6
Desktop (please complete the following information):
Additional context See for example agiledragon/gomonkey#70