Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks on Go 1.22.1 #24

Open
marcsantiago opened this issue Mar 19, 2024 · 1 comment
Open

Breaks on Go 1.22.1 #24

marcsantiago opened this issue Mar 19, 2024 · 1 comment

Comments

@marcsantiago
Copy link

marcsantiago commented Mar 19, 2024

I have tests that rely on time, I've normally normalized this by patching the time to a fixed value

func init() {
	_, _ = mpatch.PatchMethod(time.Now, func() time.Time {
		return time.Date(1980, 01, 01, 00, 00, 00, 0, time.UTC)
	})
}

where the error returned is permission denied

Seems like this it doesn't work with Go 1.22.1 as the moment I upgraded Go versions all the tests that rely on that fixed time failed. Works fine if I revert back to ~1.21.0

Breaks on both Mac and Linux

@allmazz
Copy link

allmazz commented Oct 29, 2024

works on Linux with Go 1.22.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants