programatik29 / tokio-rusqlite

Asynchronous handle for rusqlite library.
MIT License
84 stars 20 forks source link

Tests for `Connection::call` and `Connection::close` #13

Closed programatik29 closed 1 year ago

programatik29 commented 1 year ago

Currently there are no tests. It would be nice to have some before next release.

programatik29 commented 1 year ago

@Czocher thanks for your recent PR (#12). Would you be interested in writing tests for it and Connection::call?

czocher commented 1 year ago

Sure @programatik29, Since I worked a lot for the test coverage effort on rusqlite_migration by helping @cljoly, I suggest we do a five part solution (each with its own issue probably):

  1. Unit tests for the basic method tests.
  2. Integration tests for more complex scenarios (will require a small directory structure change to a workspace with subprojects).
  3. Mutation tests with cargo-mutants, so we know the branch coverage is correct.
  4. GitHub Action-based Continous Integration/Validation pipeline to verify new PRs.
  5. Coverage report with codecov or coveralls and an informational repository badge for clout.

Unit tests will come first, to make the release available ASAP. Afterwards, we shall continue from point 2 onwards.

What do you think?

czocher commented 1 year ago

Hello @programatik29, Implemented the tests on #14 and fixed a double-close panic. Please have a look whenever you find the time.

programatik29 commented 1 year ago

I think unit tests are a must. Integration tests might be nice to have.

I think other ones might be too much (complexity) for a this simple library. I'm fine with Github CI's but I haven't looked into doing that so you need to be relied on/responsible for that which is fine by me if you are willing to do it.