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

fix(deps): update module github.com/petergtz/pegomock/v3 to v4 #3534

Merged

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Jun 18, 2023

what

pegomock is upgraded to v4 which include Any[T] and Eq[T].

renovate PR is #3525.

Do

using some scripts
perl -pi -e 's/AnyStringSlice/Any[[]string]/g' **/*_test.go
perl -pi -e 's/EqString/Eq/g' **/*_test.go
perl -pi -e 's/AnyString/Any[string]/g' **/*_test.go
perl -pi -e 's/AnyInterface/Any[interface{}]/g' **/*_test.go
perl -pi -e 's/EqInt/Eq/g' **/*_test.go
perl -pi -e 's/AnyInt/Any[int]/g' **/*_test.go
perl -pi -e 's/EqBool/Eq/g' **/*_test.go
perl -pi -e 's/matchers.AnyCommand(.*?)\(/Any[command.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToCommand(.*?)\(/Any[*command.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.AnyEvents(.*?)\(/Any[events.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToEvents(.*?)\(/Any[*events.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.AnyModels(.*?)\(/Any[models.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToModels(.*?)\(/Any[*models.$1]\(/g' **/*_test.go
perl -pi -e 's/matchers.EqCommandName/Eq[command.Name]/g' **/*_test.go
perl -pi -e 's/matchers.EqModelsCommitStatus/Eq[models.CommitStatus]/g' **/*_test.go
perl -pi -e 's/matchers.EqCommandProjectContext/Eq[command.ProjectContext]/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToGithubIssueCommentEvent/Any[*github.IssueCommentEvent]/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToGithubPullRequestEvent/Any[*github.PullRequestEvent]/g' **/*_test.go
perl -pi -e 's/matchers.AnyPtrToAzuredevopsGitRepository/Any[*azuredevops.GitRepository]/g' **/*_test.go
perl -pi -e 's/matchers.AnyLoggingSimpleLogging/Any[logging.SimpleLogging]/g' **/*_test.go
perl -pi -e 's/runtimematchers.AnyMapOfStringToString/Any[map[string]string]/g' **/*_test.go
perl -pi -e 's/runtimematchers.AnyPtrToGoVersionVersion/Any[*version.Version]/g' **/*_test.go
perl -pi -e 's/tfmatchers.AnyPtrToGoVersionVersion/Any[*version.Version]/g' **/*_test.go
perl -pi -e 's/*Any\[c/Any[*c/g' **/*_test.go
perl -pi -e 's/tfmatchers.AnyMapOfStringToString/Any[map[string]string]/g' **/*_test.go
perl -pi -e 's/matchers2.AnyMapOfStringToString/Any[map[string]string]/g' **/*_test.go
perl -pi -e 's/matchers2.AnyPtrToGoVersionVersion/Any[*version.Version]/g' **/*_test.go
perl -pi -e 's/matchers.AnyTimeTime/Any[time.Time]/g' **/*_test.go
perl -pi -e 's/runtimeAny/Any/g' **/*_test.go
perl -pi -e 's/vcsAny/Any/g' **/*_test.go
perl -pi -e 's/logging_Any/Any/g' **/*_test.go

tests

  • run on ci

references

@krrrr38 krrrr38 requested a review from a team as a code owner June 18, 2023 04:40
@github-actions github-actions bot added dependencies PRs that update a dependency file go Pull requests that update Go code provider/azuredevops provider/github provider/gitlab labels Jun 18, 2023
@krrrr38 krrrr38 changed the title upgrade petergtz pegomock v4 fix(deps): update module github.com/petergtz/pegomock/v3 to v4 Jun 18, 2023
@nitrocode nitrocode added this to the v0.24.3 milestone Jun 19, 2023
Copy link
Member

@nitrocode nitrocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@nitrocode nitrocode mentioned this pull request Jun 19, 2023
21 tasks
@GenPage GenPage merged commit 3954955 into runatlantis:main Jun 20, 2023
17 of 18 checks passed
mtavaresmedeiros pushed a commit to mtavaresmedeiros/atlantis that referenced this pull request Jul 3, 2023
…lantis#3534)

* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod

* remove pegomock generate m option, which is not support after v4

* make regen-mocks

* replace pegomock v4 primitive eq/matchers

* convert pegomock v4 Eq/Any matchers

* remove custom models.Repo matcher

* pegomock v4 cannot use result method args

ref petergtz/pegomock#123

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…lantis#3534)

* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod

* remove pegomock generate m option, which is not support after v4

* make regen-mocks

* replace pegomock v4 primitive eq/matchers

* convert pegomock v4 Eq/Any matchers

* remove custom models.Repo matcher

* pegomock v4 cannot use result method args

ref petergtz/pegomock#123

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…lantis#3534)

* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod

* remove pegomock generate m option, which is not support after v4

* make regen-mocks

* replace pegomock v4 primitive eq/matchers

* convert pegomock v4 Eq/Any matchers

* remove custom models.Repo matcher

* pegomock v4 cannot use result method args

ref petergtz/pegomock#123

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies PRs that update a dependency file go Pull requests that update Go code provider/azuredevops provider/github provider/gitlab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants