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

Remove mocks from .gitignore and generate them for required module. #54

Merged
merged 5 commits into from
Jan 27, 2023

Conversation

lucafmarques
Copy link
Contributor

After moving from go-dito/lib/<module> to go-dito/<module> and running go mod tidy on the project new-segments-service, Go accuses some modules of not having a required and imported mocks package. E.g.:

go: finding module for package github.com/ditointernet/go-dito/jwks/mocks
go: finding module for package github.com/ditointernet/go-dito/http/mocks
github.com/ditointernet/new-segments-service/cmd/rest_api imports
	github.com/ditointernet/go-dito/http/middleware/authentication tested by
	github.com/ditointernet/go-dito/http/middleware/authentication.test imports
	github.com/ditointernet/go-dito/http/mocks: module github.com/ditointernet/go-dito/http@latest found (v1.1.0), but does not contain package github.com/ditointernet/go-dito/http/mocks
github.com/ditointernet/new-segments-service/cmd/rest_api imports
	github.com/ditointernet/go-dito/jwks tested by
	github.com/ditointernet/go-dito/jwks.test imports
	github.com/ditointernet/go-dito/jwks/mocks: module github.com/ditointernet/go-dito/jwks@latest found (v1.0.0), but does not contain package github.com/ditointernet/go-dito/jwks/mocks

To fix this, said modules need to provide the required package as well, because said error blocks users from even maintaining the program that requires them, as Go cannot run/build the program without first validating modules present in go.mod.

…aving mocks

go: finding module for package github.com/ditointernet/go-dito/jwks/mocks
go: finding module for package github.com/ditointernet/go-dito/http/mocks
github.com/ditointernet/new-segments-service/cmd/rest_api imports
	github.com/ditointernet/go-dito/http/middleware/authentication tested by
	github.com/ditointernet/go-dito/http/middleware/authentication.test imports
	github.com/ditointernet/go-dito/http/mocks: module github.com/ditointernet/go-dito/http@latest found (v1.1.0), but does not contain package github.com/ditointernet/go-dito/http/mocks
github.com/ditointernet/new-segments-service/cmd/rest_api imports
	github.com/ditointernet/go-dito/jwks tested by
	github.com/ditointernet/go-dito/jwks.test imports
	github.com/ditointernet/go-dito/jwks/mocks: module github.com/ditointernet/go-dito/jwks@latest found (v1.0.0), but does not contain package github.com/ditointernet/go-dito/jwks/mocks
@lucafmarques lucafmarques self-assigned this Aug 11, 2022
Mismatch happened at interfac http.AuthorizatorClient ExecuteQuery
method's return value and opa.AuthorizationResult type
@lucafmarques lucafmarques added help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Aug 11, 2022
http/.gitignore Outdated Show resolved Hide resolved
@LucaMarquesDito LucaMarquesDito merged commit 79d24f6 into master Jan 27, 2023
@github-actions
Copy link

🎉 This PR is included in version http-v1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version jwks-v1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version log-v1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version opa-v1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version trace-v1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

🎉 This PR is included in version http-v1.2.0-beta.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed released on @beta released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants