Joep Eding
09/27/2023, 10:00 AMTo test the driver you can depend on theHowever, that line is 3 years old, theand extenddriver-test
andDriverTest
to ensure it works as SQLDelight would expectTransactionTest
DriverTest
-class defines its package as com.squareup.sqldelight.driver.test
not app.cash....
, and I can find neither app.cash.sqldelight:driver-test
nor com.squareup.sqldelight:driver-test
.
Am I doing something wrong or is that piece of documentation incorrect?Derek Ellis
09/28/2023, 11:15 PMdriver-test
module isn't published, and I think it was more meant for internal testing of "first-party" drivers. It predates dialects other than SQLite so it isn't really set up to test those kinds of drivers.
I think the module can still serve as a helpful reference to see the kinds of behaviours that you should test on your driver, but you'll have to implement them for your driver separately.Joep Eding
09/29/2023, 5:50 AMand I think it was more meant for internal testing of "first-party" drivers.I started copy-pasting the abstract test classes from the SQLDelight repo and I noticed this. So far, I've got the
DriverTest
s and most of the `QueryTest`s working with only minor changes to get around the SQLite-specific stuff.
and also if your driver is open source, we'd love to feature it in the docs!It will be, as soon as I've got the whole interface implemented and all tests passing