Skip to content

Breaks on Go 1.22.1 #24

Open
Open
@marcsantiago

Description

@marcsantiago

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions