Skip to content

Conversation

@gssbzn
Copy link
Contributor

@gssbzn gssbzn commented Mar 9, 2022

Proposed changes

the make gen-mocks command has been broken for a while, fixing it and adding a test to make sure it works

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated e2e/E2E-TESTS.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

@gssbzn
Copy link
Contributor Author

gssbzn commented Mar 9, 2022

Comment on lines +49 to +52
const (
mongoCLI = "mongocli"
atlasCLI = "atlascli"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

drive by these were being imported from the version package but only used here

Comment on lines +62 to +65
type ReleaseInformation struct {
Version string
PublishedAt time.Time
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above, imported from version but only ever used here

Comment on lines -19 to -23
const (
MongoCLI = "mongocli"
AtlasCLI = "atlascli"
owner = "mongodb"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved closer to where needed

)

//go:generate mockgen -destination=../mocks/mock_release_version.go -package=mocks github.com/mongodb/mongocli/internal/version VersionFinder
//go:generate mockgen -destination=../mocks/mock_release_version.go -package=mocks github.com/mongodb/mongocli/internal/latestrelease VersionFinder
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix to mock generation

Comment on lines -32 to -35
type ReleaseInformation struct {
Version string
PublishedAt time.Time
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved closer to where needed

@@ -0,0 +1,32 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

inspired by the docs check

@gssbzn gssbzn marked this pull request as ready for review March 9, 2022 14:19
@gssbzn gssbzn requested a review from a team March 9, 2022 14:19
Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Collaborator

@fmenezes fmenezes left a comment

Choose a reason for hiding this comment

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

LGTM good job

@gssbzn gssbzn merged commit a8c90b4 into master Mar 9, 2022
@gssbzn gssbzn deleted the test-mocks branch March 9, 2022 15:00
@gssbzn
Copy link
Contributor Author

gssbzn commented Mar 9, 2022

good job

I had some good inspiration to base this work from :)

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

Successfully merging this pull request may close these issues.

4 participants