Releases: risinglightdb/sqllogictest-rs
v0.18.0
[0.18.0] - 2023-11-08
-
Support matching multiline error message under
----
for bothstatement error
andquery error
.query error SELECT 1/0; ---- db error: ERROR: Failed to execute query Caused by these errors: 1: Failed to evaluate expression: 1/0 2: Division by zero
The output error message must be the exact match of the expected one to pass the test, except for the leading and trailing whitespaces. Users may use
--override
to let the runner update the test files with the actual output.Empty lines are allowed in the expected error message. As a result, the message must end with two consecutive empty lines.
Breaking changes in the parser:
- Add new variants to
ParseErrorKind
. Mark it as#[non_exhaustive]
. - Change the type of
expected_error
fromRegex
toExpectedError
, which is either a inlineRegex
or multilineString
.
- Add new variants to
v0.17.2
[0.17.2] - 2023-11-01
- fix(runner): fix parallel testing db name duplication. Now we use full file path instead of filename as the temporary db name in
run_parallel_async
.
v0.17.1
[0.17.1] - 2023-09-20
- bin: support envvars
SLT_HOST/PORT/DB/USER/PASSWORD
v0.17.0
[0.17.0] - 2023-09-19
-
Support environment variables substituion for SQL and system commands.
For compatibility, this feature is by default disabled, and can be enabled by addingcontrol substitution on
to the test file.control substitution on query TTTT SELECT '$foo' -- short , '${foo}' -- long , '${bar:default}' -- default value , '${bar:$foo-default}' -- recursive default value FROM baz; ---- ...
Besides, there's a special variable
$__TEST_DIR__
which is the path to a temporary directory specific to the current test case.
This can be helpful if you need to manipulate some external resources during the test.control substitution on statement ok COPY (SELECT * FROM foo) TO '$__TEST_DIR__/foo.txt'; system ok echo "foo" > "$__TEST_DIR__/foo.txt"
Changes:
- (parser) Breaking change: Add
Control::Substitution
. MarkControl
as#[non_exhaustive]
. - (runner) Breaking change: Remove
enable_testdir
. For migration, one should now enable general substitution by thecontrol
statement and use a dollar-prefixed$__TEST_DIR__
.
- (parser) Breaking change: Add
v0.16.0
[0.16.0] - 2023-09-15
-
Support running external system commands with the syntax below. This is useful for manipulating some external resources during the test.
system ok echo "Hello, world!"
The runner will check the exit code of the command, and the output will be ignored. Currently, only
ok
is supported.Changes:
- (parser) Breaking change: Add
Record::System
, and correspondingTestErrorKind
andRecordOutput
. MarkTestErrorKind
andRecordOutput
as#[non_exhaustive]
. - (runner) Add
run_command
toAsyncDB
trait. The default implementation will run the command withstd::process::Command::status
. Implementors can override this method to utilize an asynchronous runtime such astokio
.
- (parser) Breaking change: Add
-
fix(runner): fix database name duplication for parallel tests by using the full path of the test file (instead of the file name) as the database name.
v0.15.3
[0.15.3] - 2023-08-02
- fix(bin): fix error context display. To avoid stack backtrace being printed, unset
RUST_BACKTRACE
environment variable, or use pre-built binaries built with stable toolchain instead.
Release: v0.15.2
- fix(bin): do not print stack backtrace on error
Release: v0.15.1
- fix
statement error
unexpectedly passed when result is a successfulquery
. Similarly for expectedquery error
but successfulstatement ok
.
Release: v0.15.0
- Allow multiple connections to the database in a single test case, which is useful for testing the transaction behavior. This can be achieved by attaching a
connection foo
record before the query or statement.- (parser) Add
Record::Connection
. - (runner) Breaking change: Since the runner may establish multiple connections at runtime,
Runner::new
now takes aimpl MakeConnection
, which is usually a closure that returns a try-future of theAsyncDB
instance. - (bin) The connection to the database is now established lazily on the first query or statement.
- (parser) Add
Release: v0.14.0
- We enhanced how
skipif
andonlyif
works. Previously it checks againstDB::engine_name()
, andsqllogictest-bin
didn't implement it.- (parser) A minor breaking change: Change the field names of
Condition:: OnlyIf/SkipIf
. - (runner) Add
Runner::add_label
. Now multiple labels are supported (DB::engine_name()
is still included). The condition evaluates to true if any of the provided labels match theskipif/onlyif <lable>
. - (bin) Add
--label
option to specify custom labels.
- (parser) A minor breaking change: Change the field names of