Skip to content
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

Is tests/x.py maintained? And I tried fix it. #2754

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

qwerty2501
Copy link
Contributor

@qwerty2501 qwerty2501 commented Sep 14, 2023

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, the tests/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.

@abonander
Copy link
Collaborator

I don't personally use x.py and neither do the tests. I've considered just getting rid of it.

@qwerty2501
Copy link
Contributor Author

Thank you for response.
I'll close this PR.

@qwerty2501 qwerty2501 closed this Oct 11, 2023
@abonander abonander reopened this Oct 19, 2023
@abonander
Copy link
Collaborator

I'd hate to see this effort go to waste.

@abonander abonander merged commit 00b077a into launchbadge:main Oct 19, 2023
64 checks passed
@qwerty2501 qwerty2501 deleted the fix/tests-x-py branch December 26, 2023 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants