[tests] Repository has zero working tests — rewrite SDK + server integration tests against current API #2
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_matrixchat#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
State as of 2026-04-26
After cleanup in [PR #N], the workspace has zero working tests:
No unit tests, no doc tests, no integration tests.
How we got here
Two integration test files existed but were stale and didn't compile:
crates/hero_matrixchat_sdk/tests/integration_test.rs— referencedhero_matrixchat_sdk::MatrixClient(the old direct-Matrix-protocol client). The SDK was refactored to be the OpenRPC client forhero_matrixchat_server(now exposingHeroMatrixchatServerClient). The oldMatrixClientno longer exists in the SDK; the integration test was orphaned.crates/hero_matrixchat_examples/tests/integration.rs— usedMatrixChatClient::new(&path)(no such constructor) andclient.health()with no args (now requiresHealthInput { profile: None }). API drift from the same SDK refactor.Both caused 122 cumulative compile errors and made
lint.yamlpermanently red. Both were deleted in the CI-sweep PR. Deleting them did not lose any working test coverage (they were already non-functional).What needs to happen
Three distinct kinds of tests are missing and should be added:
crates/hero_matrixchat_sdk/src/— test theconfig::*,error::*modules and the type aliases. Plaincargo testrunnable, no external services.crates/hero_matrixchat_sdk/tests/— bring up an in-processhero_matrixchat_servermock or usemockito/wiremockto verify the OpenRPC client serialises requests + parses responses correctly. No real Matrix server needed.examples/tests/integration.rswas attempting) — require a runninghero_matrixchatbinary +hero_proc+ a Matrix homeserver. Should be#[ignore]'d for CI, runnable ascargo test -- --ignoredon a dev box with the live stack. Document the setup in a header comment.Acceptance criteria
cargo test --workspace --all-targetsreports a meaningful number of passing tests (not zero)#[ignore]'d so they run on demand onlyRelated
Signed-off-by: mik-tf