tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
166 stars 23 forks source link

Add tests #24

Closed avinassh closed 1 year ago

avinassh commented 1 year ago

I have added a few tests, this will also make sure that changes made in PR #23 work nicely.

Running Tests

To run tests, set env variable pointing to the libsql database and then run make test

$ export LIBSQL_TEST_DB_URL=wss://della-avinassh.turso.io?jwt=eyJ...sCg
$ go test -v -count=1 ./...

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 PR

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

haaawk commented 1 year ago

Thanks @avinassh I left few comments but looks great otherwise.

haaawk commented 1 year ago

Timestamps are not supported yet. We need support from Turso to implement it. It's on its way.

haaawk commented 1 year ago

Thanks @avinassh