-
Notifications
You must be signed in to change notification settings - Fork 16
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
add schema tests to the shell pipeline #318
Conversation
I validated that the task works as expected with fly execute. Once I verify it is working as expected in the pipeline I'll add it as a passed constraint to the publish job. I'll also move the integ tests to the test job, that way we will always auto run the tests and publish can be executed with the latest version that passed the tests (or any selected version that passed the tests)
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.
looks good, except for the ||
comment.
might be nice to put this in the github PR ci too.
fsl/test-script.mjs
Outdated
if (collNames.length != expectedCollNames.length && !collNames.every((elem, idx) => elem === expectedCollNames[idx])) { | ||
throw new Error(`Schema collections do not match actual: ${collNames} expected: ${expectedCollNames}`) | ||
} | ||
const funcNames = await execPaginated("Function.all().map(.name)") | ||
if (funcNames.length != expectedFuncNames.length && !funcNames.every((elem, idx) => elem === expectedFuncNames[idx])) { | ||
throw new Error(`Schema functions do not match actual: ${collNames} expected: ${expectedCollNames}`) | ||
} |
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.
if (collNames.length != expectedCollNames.length && !collNames.every((elem, idx) => elem === expectedCollNames[idx])) { | |
throw new Error(`Schema collections do not match actual: ${collNames} expected: ${expectedCollNames}`) | |
} | |
const funcNames = await execPaginated("Function.all().map(.name)") | |
if (funcNames.length != expectedFuncNames.length && !funcNames.every((elem, idx) => elem === expectedFuncNames[idx])) { | |
throw new Error(`Schema functions do not match actual: ${collNames} expected: ${expectedCollNames}`) | |
} | |
if (collNames.length != expectedCollNames.length || !collNames.every((elem, idx) => elem === expectedCollNames[idx])) { | |
throw new Error(`Schema collections do not match actual: ${collNames} expected: ${expectedCollNames}`) | |
} | |
const funcNames = await execPaginated("Function.all().map(.name)") | |
if (funcNames.length != expectedFuncNames.length || !funcNames.every((elem, idx) => elem === expectedFuncNames[idx])) { | |
throw new Error(`Schema functions do not match actual: ${collNames} expected: ${expectedCollNames}`) | |
} |
thats a good callout, I think I'll need to do a bit of tweaking there to use the docker image and create a fresh db and such so we don't run into any issues with them running concurrently. Definitely seems useful to get them on the prs in that manner. |
I validated that the task works as expected with fly execute. Once I verify it is working as expected in the pipeline I'll add it as a passed constraint to the publish job. I'll also move the integ tests to the test job, that way we will always auto run the tests and publish can be executed with the latest version that passed the tests (or any selected version that passed the tests)