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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add migrate db seed test #2048

Merged
merged 8 commits into from
Sep 6, 2021
Merged

test: add migrate db seed test #2048

merged 8 commits into from
Sep 6, 2021

Conversation

Jolg42
Copy link
Member

@Jolg42 Jolg42 commented Sep 3, 2021

Based on and replaces #1807

closes #1806

@janpio this adds 12 jobs 馃槰

@Jolg42 Jolg42 added this to the 2.31.0 / 3.0.x milestone Sep 3, 2021
@Jolg42 Jolg42 mentioned this pull request Sep 3, 2021
@Jolg42 Jolg42 marked this pull request as ready for review September 3, 2021 14:39
@Jolg42 Jolg42 requested review from janpio and millsp September 3, 2021 14:43
@Jolg42
Copy link
Member Author

Jolg42 commented Sep 3, 2021

I think we should remove the enginetype from the matrix here, it doesn鈥檛 bring any value I can see (it's tested in other tests and that would reduce the number of jobs here)


set -eux

yarn prisma db pull --print
Copy link
Member

Choose a reason for hiding this comment

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

confirmation that db push worked?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a copy paste from your script, so probably


# generate not needed, it will be done by db push
# yarn prisma generate
yarn prisma db push --force-reset
Copy link
Member

Choose a reason for hiding this comment

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

if force-reset does not work for whatever reason, the test would possibly also succeed if the seeding fails, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well here it's about preparing the db and I assume test.sh runs after with

#!/bin/sh

set -eux

yarn prisma db pull --print

yarn prisma db seed

yarn test

This should fail

@Jolg42 Jolg42 merged commit 4993ed4 into dev Sep 6, 2021
@Jolg42 Jolg42 deleted the pr/migrate-db-seed branch September 6, 2021 09:39
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.

Test seeding
3 participants