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

test: improve goose cli testing #589

Merged
merged 5 commits into from
Aug 27, 2023
Merged

test: improve goose cli testing #589

merged 5 commits into from
Aug 27, 2023

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Aug 26, 2023

This PR improves the goose_test.go tests. I noticed we were building the full goose binary in multiple parallel tests and didn't have good output assertions.

  • Build a lite version (sqlite3 driver only) once and run multiple parallel tests with a pre-built binary
  • Build a full binary with all drivers
  • Test linker tags -X main.version (avoid regressions such as goose -version always prints (devel) #585)
  • Always use t.TempDir() and avoid building binaries and files in the root of the project (no more manual cleanup)
  • All tests can now run in parallel with their own state
  • Use _test packages and shuffle around tests into goose_cli_test.go and goose_embed_test.go

@mfridman mfridman merged commit 958c950 into master Aug 27, 2023
8 checks passed
@mfridman mfridman deleted the mf-improvetests branch August 27, 2023 13:20
@VojtechVitek
Copy link
Collaborator

Cool tests :)

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.

2 participants