Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,3 @@ For automated contributors specifically:
- Integration tests stay in the crate's `tests/` directory.
- OpenHuman's `scripts/externalize-inline-tests.mjs <repo-root> --write` moves
inline test modules out mechanically; without `--write` it only reports.
- Existing `test.rs` and `<module>_test.rs` files predate this rule. Rename each
to `<module>_tests.rs` (keep its `mod` name, add the `#[path]` attribute) the
next time you touch it.
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/agent_tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ pub use registry_tools::{RegistryTool, registry_tool_specs};
pub use types::{AgentToolEffect, AgentToolSpec, ArgsError};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/audit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ mod types;
pub use types::{AuthDetection, AuthKind};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/errors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,5 @@ pub const ALL: &[&str] = &[
];

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/names/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,5 @@ pub const METHODS: &[&str] = &[
];

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/sanitize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,5 @@ pub fn sanitize_for_llm(input: &str, max_bytes: usize) -> String {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp-bus/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ fn binds(host: (u32, u32), module: (u32, u32)) -> bool {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/audit/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ mod types;
pub use types::AuditStore;

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/config_servers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ mod types;
pub use types::{McpRegistrySource, McpServerDefinition, McpServerRegistry, McpTransportClient};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,5 @@ fn rendered_body(body: &str) -> String {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/boot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ mod types;
pub use types::{BOOT_CONCURRENCY, BootOutcome, connect_installed_servers};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/config_doc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ pub use document::{ROOT_KEY, merge_credentials, parse, render, same_dial, to_ins
pub use types::{AppliedServer, ConfigApplyReport, Declared};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/connections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ pub(crate) use dial::build_http_auth;
pub use types::{Connections, ProbeOutcome, REMOTE_REQUEST_TIMEOUT};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/curation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/oauth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ pub use tokens::{OAUTH_BUNDLE_KEY, refresh_if_expired};
pub use types::{AuthDetection, AuthKind};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ pub use install::{build_install_transport, collect_required_env_keys, pick_conne
pub use types::McpRegistry;

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ mod types;
pub use types::{IDLE_TTL, REQUEST_TIMEOUT, SecretRef, SecretVault};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ pub use smithery::SmitheryRegistry;
pub use types::{Registries, RegistrySource, SOURCE_MCP_OFFICIAL, SOURCE_SMITHERY};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/sources/official/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,5 @@ fn auth_token(auth: &McpRegistryAuthConfig) -> Option<String> {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/sources/smithery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,5 @@ pub(super) fn tag_source(mut servers: Vec<RegistryServerSummary>) -> Vec<Registr
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ pub use tool_cache::{CachedTools, installed_fingerprint, static_cache_key};
pub use types::Store;

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/registry/supervisor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ pub use report::{ServerRef, SupervisorEvent, TickReport};
pub use types::{SupervisedHost, Supervisor, SupervisorConfig};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,5 @@ fn bounded_positive(key: &str, value: &Value, max: u64) -> Result<u64, ToolCallE
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,5 @@ fn text_error(status: StatusCode, message: &str) -> Response {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,5 @@ fn valid_request_id(id: &Value) -> bool {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ pub(crate) fn object_keys(value: &Value) -> Vec<String> {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/server/stdio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ where
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/tinybus_module/directories/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ pub(super) use types::DirectoryOpener;
pub(super) use types::MAX_OPEN_DIRECTORIES;

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/tinybus_module/maintenance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ mod types;
pub(super) use types::Maintenance;

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/tinybus_module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,5 @@ export_module! {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
3 changes: 3 additions & 0 deletions crates/tinymcp/src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,12 @@ pub fn tools_for(
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;

#[cfg(test)]
#[path = "bridge_tests.rs"]
mod bridge_test;
#[cfg(test)]
#[path = "scrub_tests.rs"]
mod scrub_test;
File renamed without changes.
1 change: 1 addition & 0 deletions crates/tinymcp/src/transport/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,4 +1037,5 @@ fn fill_missing_metadata(
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ pub(crate) fn validate_protocol_version(version: &str) -> Result<()> {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/transport/stdio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,5 @@ impl McpStdioClient {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
1 change: 1 addition & 0 deletions crates/tinymcp/src/transport/stdio/spawn_env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,5 @@ pub fn required_runtime(command: &str) -> CommandKind {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
Loading