-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[SQL Logic Test] Add support for environment variables #5877
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
Conversation
Just realized I need to check for name collision with loops/foreach parameters Also, I thought I was just making this PR to my own fork.. I don't think it's done yet, for one it's missing 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.
added a small comment, also a test would indeed be nice.
Maybe this is a good opportunity to switch all S3 test cases to use env variables from #5419 instead of the SET variables. Using the new require-env we could instead of checking for S3_TEST_SERVER_AVAILABLE, check for the presence of the AWS credentials in the env. This would also allow easy switching between s3 backends when testing.
I've adjusted all existing [s3] tests:
|
Thanks for the PR! LGTM. @samansmink any more thoughts? |
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.
Thanks for the changes, looks good! I added one small comment
Looks good from my side, @samansmink any more comments or is this ready to go? |
@Mytherin lgtm! |
This PR adds support to the unittest for using environment variables in sql
Previously
require-env
required 2 arguments:name
andexpected_value
Now optionally you can leave out the
expected_value
, in which case we only verify that the environment variable is defined.On top of that, we also now register these environment variables and allow tests to use them in SQL
Example
Note:
This does not yet work in a result list
Should probably also add this