Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing

Choose the narrowest command that covers the change and always specify the crate for crate-level commands.

PurposeCommand
Workspace type checkcargo check --message-format=short
Crate unit testscargo test -p <crate_name>
Integration testscargo test -p test_integration
Raft integration testscargo nextest run -p test_integration --profile raft
Live API testscargo nextest run --profile api -p test_api
Formatting checkcargo fmt --all -- --check
Crate lintcargo clippy -p <crate_name>

Live API Tests

The API profile starts SPIRE, OPA, and a real Keystone server through tools/start-api.sh. Run tools/teardown-api.sh before a fresh run if a prior run was interrupted. Do not pipe nextest through tail; redirect it to a file because long-running child processes inherit the output descriptor.

The bootstrap-created default domain does not receive OAuth2 signing keys. Tests that need JWKS or discovery must create a new domain through the API and poll for asynchronous key provisioning.

Password authentication returns IdentityInfo::User. Mocks for the real password-auth path must use the same identity variant.

Documentation Tests

Regenerate the API specification and build the book:

cargo run -p openstack-keystone --bin keystone -- --dump-openapi yaml \
  > doc/src/openapi.yaml
mdbook build doc

doc/src/openapi.yaml is generated input for the documentation build and is intentionally ignored by Git. The mdBook workflow regenerates it before every published build; do not add it to a commit.