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

getting started integration tests #4083

Conversation

mwspracklen
Copy link

Working on adding integration tests per #777 . I've created a quick example of how I'm planning to implement this in examples/sqlite/getting_started_step_2 . Initial thought is to add a tests directory with a test that uses assert_cmd to run the relevant binaries for each step. Considering writing in some calls to diesel to examine the database as well, let me know if that's the correct route or if just verifying binary output is sufficient.

In examples/sqlite/getting_started_step_2 I ran the following to test
echo "DATABASE_URL=file:/tmp/test.db" > .env; rm -f /tmp/test.db ; diesel migration run; cargo test; rm -f .env

@mwspracklen mwspracklen changed the title getting started integration tests initial concept getting started integration tests Jun 25, 2024
@weiznich weiznich requested a review from a team June 26, 2024 11:19
@VicVerevita
Copy link
Contributor

Hello, I have made the postgresql and mysql tests for getting started in #4087. Tell me if you will finish the sqlite tests or if I should add them as well in my PR.

@mwspracklen
Copy link
Author

I was planning to wait for feedback, but it's probably better if there's one PR for the whole issue, so you can take the whole thing and I'll delete this PR

@mwspracklen mwspracklen deleted the sprack-getting-started-integration-tests branch June 28, 2024 23:22
@weiznich
Copy link
Member

weiznich commented Jul 2, 2024

It would have been better to at least pull in the commit that @mwspracklen has done, but now it is at it is.

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.

3 participants