Add devenv smoke script and Testing section to README
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
1 parent
3fd7cc1b60
commit
d616b51db6
2 files changed
+9
No files matched your search
@@ -165,6 +165,14 @@ Metrics are polled every `metrics_interval_secs` (systemd unit active/failed/res
|
||||
ldd /usr/local/bin/slinuxm # libc, libm, libgcc_s, libsystemd and its dependencies only
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
```sh
|
||||
devenv shell -- smoke # same as: cargo test --test binary_smoke -- --nocapture
|
||||
```
|
||||
|
||||
The smoke test runs the real built `slinuxm` binary against a throwaway SQLite database in a temp directory: it creates a token with the CLI, starts `serve` on a free loopback port, exercises `/healthz`, REST and MCP with and without the token, revokes the token, and checks a clean SIGTERM exit and a 0600 database. It needs no root and no network. Checks that depend on host data (systemd over D-Bus, the journal) are skipped with a printed reason when the source is unavailable; Docker is never required.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
scripts.build.exec = ''cargo build "$@"'';
|
||||
scripts.run.exec = ''cargo run -- "$@"'';
|
||||
scripts.smoke.exec = "cargo test --test binary_smoke -- --nocapture";
|
||||
scripts.token.exec = ''cargo run -- token "$@"'';
|
||||
|
||||
enterShell = ''
|
||||
|
||||
Reference in new issue
Block a user