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 current version in empty up state #533

Merged
merged 3 commits into from
Jun 10, 2023
Merged

Fix current version in empty up state #533

merged 3 commits into from
Jun 10, 2023

Conversation

mfridman
Copy link
Collaborator

Fix #532

For up cases when there are no versions to apply (such as when you run up multiple times in a row), we need to lookup the current version.

goose_test.go Outdated
output string
}{
{"up", true, ""},
{"up", false, "goose: no migrations to run. current version: 3"},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test covers the wrong version in the print line. It's also intended to be an improved way to write these kinds of tests. We'll likely want to add "golden files" to capture the output.

Note, the binary is built once and reused so future tests can just call runGoose

@mfridman mfridman merged commit d88978d into master Jun 10, 2023
8 checks passed
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.

unexpected version reported when running 'goose up' in the no change case
1 participant