Is tests/x.py maintained? And I tried fix it. #2754
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I found some bugs in
tests/x.py
.Is it maintained?
Also, I tried fix it and made some small improvements.
Please use this if you like.
Here's contents of fixing and improvements.
1. Added ipaddr extension library to gitignore.(improve)
In Macos and Linux, download ipaddr binary when running
tests/x.py
.However, they are targeting git modifications and it takes time and effort to remove them from the commit target.
So I added to gitignore ipaddr library files.
2. Added current directory to
LD_LIBRARY_PATH
environment variable.(fix)In Linux, shared libraries in the current directory are not loaded, so add the current directory to the LD_LIBRARY_PATH environment variable.
3. Removed specific primary key in insert when testing sqlite.(fix)
In sqlite it_encodes_bool_with_any, originally it was inserted by specifying the primary key.
However, Since it_encodes_bool_with_any is executed for each test cases, it is conflicted.
So I removed specific primary key in insert.
From a testing perspective, it was to check whether bool encoding and AnyQueryResult worked, so I decided there was no problem.
4. Copy the db file to new testing db file when run sqlite testing.(improve)
After executed
tests/x.py
, thetests/sqlite/sqlite.db
is modified and it is targeted git modifications.It also takes time and effort to prevent this from being commited.
So I modified run function in
tests/x.py
to copy db file for each test cases when sqlite testing and changed sqlite.db to sqlite.test.db in gitignore file.5. Avoid running test when cases are mysql5.7 and rustls.(fix)
Since docker mysql 5.7 limitation, TLSv1.2 is not supported and rustls only supports TLSv1.2 and above, I modified
tests/x.py
to avoid running test when cases are mysql5.7 and rutls.