taskwarrior/taskchampion/integration-tests
Dustin J. Mitchell f054a4061e
Remove taskchampion-sync-server (#3380)
This crate has been moved to
https://github.com/GothenburgBitFactory/taskchampion-sync-server.

The integration-tests repo used the sync server to test integration
between taskchampion and the sync-server. We should do that again, but
after taskchampion moves to its own repo (#3209). In the interim, the
cross-sync integration test can simply test syncing between local
servers, but the snapshot test is no longer useful as the local server
does not support snapshots.
2024-04-20 12:44:06 +00:00
..
src Check that sync.server.origin is a URL (#3361) 2024-04-16 02:11:55 +00:00
tests Remove taskchampion-sync-server (#3380) 2024-04-20 12:44:06 +00:00
.gitignore rename rust/ to taskchampion/ 2022-07-29 21:41:41 -04:00
build.rs Use ffizz_header to generate taskchampion.h 2023-06-19 13:36:17 -04:00
Cargo.toml Remove taskchampion-sync-server (#3380) 2024-04-20 12:44:06 +00:00
README.md Better links from TW devel docs to TaskChampion (#3253) 2024-01-21 18:03:11 -05:00

Integration Tests for TaskChampion

"Regular" Tests

Some of the tests in tests/ are just regular integration tests. Nothing exciting to see.

Bindings Tests

The bindings tests are a bit more interesting, since they are written in C. They are composed of a collection of "suites", each in one C file in integration-tests/src/bindings_tests/. Each suite contains a number of tests (using Unity) and an exported function named after the suite that returns an exit status (1 = failure).

The build script (integration-tests/build.rs) builds these files into a library that is linked with the integration_tests library crate. This crate contains a bindings_tests module with a pub function for each suite.

Finally, the integration-tests/tests/bindings.rs test file calls each of those functions in a separate test case.

Adding Tests

To add a test, select a suite and add a new test-case function. Add a RUN_TEST invocation for your new function to the .._tests function at the bottom. Keep the RUN_TESTs in the same order as the functions they call.

Adding Suites

To add a suite,

  1. Add a new C file in integration-tests/src/bindings_tests/, based off of one of the others.
  2. Add a the suite name to suites in integration-tests/build.rs.