Closed avinassh closed 1 year ago
I have added a few tests, this will also make sure that changes made in PR #23 work nicely.
/tests
ws
Test_TimeStamp
To run tests, set env variable pointing to the libsql database and then run make test
make test
$ export LIBSQL_TEST_DB_URL=wss://della-avinassh.turso.io?jwt=eyJ...sCg $ go test -v -count=1 ./...
Adding to Github workflow is easy. You need to add the LIBSQL_TEST_DB_URL as repository secret first, then tests can run automatically on PR
LIBSQL_TEST_DB_URL
I have added the workflow file in my repo and have setup automated tests - https://github.com/avinassh/libsql-client-go/pull/1
If this is okay, then I can add the workflow file to this PR
Thanks @avinassh I left few comments but looks great otherwise.
Timestamps are not supported yet. We need support from Turso to implement it. It's on its way.
Thanks @avinassh
I have added a few tests, this will also make sure that changes made in PR #23 work nicely.
/tests
as we need to import the driver. Keeping them inside the package doesn't work due to cyclic importsws
package since http APIs don't support transactions or prepared statementsTest_TimeStamp
doesn't pass yet, I think this library doesn't handle timestamp fieldsRunning Tests
To run tests, set env variable pointing to the libsql database and then run
make test
CI/CD
Adding to Github workflow is easy. You need to add the
LIBSQL_TEST_DB_URL
as repository secret first, then tests can run automatically on PRI have added the workflow file in my repo and have setup automated tests - https://github.com/avinassh/libsql-client-go/pull/1
If this is okay, then I can add the workflow file to this PR