-
Notifications
You must be signed in to change notification settings - Fork 25
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(studio): Mutation & Node-API usage tests for Studio #1803
Conversation
I was incorrect. |
No, the CLI/SDK should already use the engine library when you install it with the env var in the first place. No query engine binary necessary at all. |
Not relevant anymore. |
|
||
parentId Int | ||
parent User @relation(fields: [parentId], references: [id]) | ||
children User[] @relation("UserToUser") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just causing problems while deleting etc. I have a test for self-referential models in Studio, so all good
@@ -1,13 +1,49 @@ | |||
#!/bin/sh | |||
|
|||
set -eu | |||
set -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed -u
because we do not want to stop the script for undefined variables (in our case, PRISMA_FORCE_NAPI
might be undefined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a test here that considers that - most of the other scripts that contain PRISMA_FORCE_NAPI
do that.
echo '[2] QE binary exists when it should not' | ||
exit 1 | ||
fi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some assertions that should check if anything extra was downloaded.
If you look on line 11, I delete binaries if PRISMA_FORCE_NAPI
is set, and then check again here if they exist. If they do, it means someone downloaded them, and the test fails.
The same happens if PRISMA_FORCE_NAPI
is not set, libraries are deleted before jest
, and checked after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if all paths I check are sufficient, can obviously add other places we expect to find the binary / library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows the paths should be different for the Node-API library, but I assume that is not being tested here so does not affect things.
@janpio This is ready for review! Merge whenever! |
No description provided.