Skip to content

Repository files navigation

mithril

lang licensing Validate codecov

New VATUSA API for facilities and guests.

All content herein is solely for use on the VATSIM network.

Project goals

  1. Completely replace the existing VATUSA API for subdivisions and other clients
  2. Be accurate, consistent, and correct
  3. Be fast

Building

Requirements

  • Git
  • A recent version of Rust

Steps

git clone https://github.com/vatusa/mithril
cd mithril
cargo build

This app follows all Clippy lints on Nightly Rust. You can use either both a stable and nightly toolchain, or just a nightly (probably; I use the dual setup). If using both, execute clippy with cargo +nightly clippy. You do not need this for running the app, just developing on it.

Running

Environment Variables

  • DISABLE_ROSTER_POLLER: Set to true or 1 to disable the roster change poller background task. By default, the poller runs and periodically syncs roster changes. Set this to disable polling in development or testing scenarios.

Integration testing

Integration tests use Hurl to exercise the running HTTP API against an ephemeral, schema-only MySQL instance (no JVM, no test code to maintain).

just test-integration

This builds the app image, brings up docker-compose.test.yml (MySQL seeded from tests/fixtures/*.sql, plus the mithril app container), runs every *.hurl file in tests/hurl/, then tears the stack down (down -v) so the next run starts from a clean database. See tests/fixtures/ for the schema dumps and seed data, and tests/hurl/ for the test scenarios.

Code coverage

Combined unit + integration test coverage, via cargo-llvm-cov:

just test-coverage

This runs cargo test's unit tests, then runs the app natively (instrumented by cargo llvm-cov run) against a dockerized MySQL-only instance and exercises it with the same tests/hurl/*.hurl suite used by just test-integration, so both test styles feed one merged report. Output: a terminal summary, an HTML report at target/llvm-cov/html/index.html, and an lcov file at target/llvm-cov/lcov.info.

CI runs the same recipe on every push/PR (.github/workflows/validate.yml, coverage job) and uploads the lcov file to Codecov, which is what the badge above reflects.

Deploying

TBD

License

See LICENSE.md.

Contributing

Contributions are currently closed to anyone not on the VATUSA Web Team.

Contributors

Languages