Initial Proof-of-Concept for #22 (use Firebird embedded for Tests)
Initial Proof-of-Concept for #22. Do not merge. For initial review only.
- Windows only (may be expanded to other O.S. later)
- Helper scripts in Powershell (may be converted to Python)
- Uses environment variables to pass parameters to test code (simpler than command line arguments)
- Adds files for VSCode debug/test explorer support (may be removed)
Use the script Rebuild-Databases to
- download the latest binaries to a
$env:TEMP/firebird-driver-testsfolder; and - rebuild test databases from
./test/fbtest30-src.fbkbackup file.
Use the script Set-TestEnvironment to update .env file used by VSCode to discover and run tests.
Added @pcisar suggestions from #22.
With one difference: it is still using the databases built from Powershell script (instead of the commited ones).
I believe the best course of action from here would be to incorporate the Rebuild-Databases.ps1 logic into tests Setup (in Python).
There are other databases already being created (e.g. fbevents.fdb) in some test cases. Ideally all of them should be built from a single piece of code.
I'll look into this in the next few days. I believe it will make everything simpler.
I'll look into this in the next few days. I believe it will make everything simpler.
@pcisar if you have other considerations, please comment.
@pcisar do you have the script to build fbtest30-src.fbk from scratch?
I tried to reverse engineer it but my tools cannot decode the ARRAY columns.
The idea is to rebuild the databases from SQL instead from gbak / .fbk.
Offtopic. Sometimes I got these errors
./test_driver.py::TestServerStandard::test_wait Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerStandard::test_running Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerServices::test_01_output_by_line Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 2: ordinal not in range(128)
./test_driver.py::TestServerServices::test_02_output_to_eof Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerServices::test_03_log Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
I have no idea where they come from. It seems something related to UTF8 (which uses 128 as special marker)?
@pcisar Could you help me with this one?
@pcisar do you have the script to build
fbtest30-src.fbkfrom scratch?I tried to reverse engineer it but my tools cannot decode the
ARRAYcolumns.The idea is to rebuild the databases from SQL instead from
gbak/.fbk.