[SQL Logic Test] Add support for environment variables#5877
[SQL Logic Test] Add support for environment variables#5877Mytherin merged 8 commits intoduckdb:masterfrom
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 😅 |
samansmink
left a comment
There was a problem hiding this comment.
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? |
samansmink
left a comment
There was a problem hiding this comment.
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-envrequired 2 arguments:nameandexpected_valueNow 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