Skip to content
Closed
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
15 changes: 15 additions & 0 deletions src/openhuman/channels/providers/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,23 @@ pub mod test_support {
}
}

#[cfg(test)]
pub(crate) use schemas::{
json_output, optional_bool, optional_f64, optional_string, optional_u64, required_string,
};
#[cfg(test)]
pub(crate) use session::{
compose_system_prompt_suffix, locale_reply_directive, normalize_model_override,
provider_role_for_model_override,
};
#[cfg(test)]
pub(crate) use types::SessionCacheFingerprint;
#[cfg(test)]
pub(crate) use types::WebChatParams;
#[cfg(test)]
pub(crate) use web_errors::{
inference_budget_exceeded_user_message, is_inference_budget_exceeded_error,
};

#[cfg(test)]
#[path = "../web_tests.rs"]
Expand Down
4 changes: 3 additions & 1 deletion src/openhuman/config/schema/load/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ pub(crate) use super::Config;
#[cfg(test)]
pub(crate) use dirs::ACTIVE_USER_STATE_FILE;
#[cfg(test)]
pub(crate) use env::ProcessEnvWithoutWorkspace;
pub(crate) use dirs::{ACTION_DIR_ENV_VAR, MEMORY_SYNC_INTERVAL_SECS_ENV_VAR};
#[cfg(test)]
pub(crate) use env::{EnvLookup, ProcessEnvWithoutWorkspace};
#[cfg(test)]
pub(crate) use impl_load::parse_config_with_recovery;
#[cfg(test)]
Expand Down
4 changes: 4 additions & 0 deletions src/openhuman/config/schemas/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ use helpers::{
#[cfg(test)]
use serde_json::{Map, Value};

#[cfg(test)]
#[cfg(test)]
pub(crate) use schema_defs::schemas;

#[cfg(test)]
#[path = "../schemas_tests.rs"]
mod tests;
3 changes: 3 additions & 0 deletions src/openhuman/inference/local/service/ollama_admin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ mod util;
// Re-export free functions that form the public/crate API of this module.
pub(crate) use util::test_ollama_connection;

#[cfg(test)]
pub(crate) use util::interrupted_pull_settle_window_secs;

#[cfg(test)]
#[path = "../ollama_admin_tests.rs"]
mod tests;
3 changes: 3 additions & 0 deletions src/openhuman/inference/provider/reliable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,9 @@ impl Provider for ReliableProvider {
}
}

#[cfg(test)]
pub(crate) use super::traits::StreamError;

#[cfg(test)]
#[path = "reliable_tests.rs"]
mod tests;
3 changes: 3 additions & 0 deletions src/openhuman/mcp_server/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pub use serde_json::{json, Value};
#[cfg(test)]
pub use types::{DEFAULT_LIMIT, MAX_LIMIT, TREE_TAG_MAX_TAGS, TREE_TAG_MAX_TAG_LENGTH};

#[cfg(test)]
pub(crate) use specs::list_tools_result_for_config;

#[cfg(test)]
#[path = "../tools_tests.rs"]
mod tests;
1 change: 1 addition & 0 deletions src/openhuman/memory/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ pub mod test_override {
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::config::schema::DEFAULT_CLOUD_LLM_MODEL;

#[test]
fn build_provider_returns_inference_wrapper_when_default() {
Expand Down
2 changes: 2 additions & 0 deletions src/openhuman/memory/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pub use registry::{all_controller_schemas, all_registered_controllers};

// Re-export the NAMESPACE constant so schema_tests.rs can reference it via
// `super::NAMESPACE` the same way the original flat module did.
#[cfg(test)]
pub(crate) use definitions::NAMESPACE;

#[cfg(test)]
#[path = "../schema_tests.rs"]
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/memory/tree_source/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fn write_atomic(path: &Path, bytes: &[u8]) -> Result<()> {
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::memory_store::trees::types::{TreeKind, TreeStatus};
use chrono::TimeZone;
use tempfile::TempDir;

Expand Down
1 change: 1 addition & 0 deletions src/openhuman/sandbox/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ pub fn validate_docker_policy(policy: &SandboxPolicy) -> Result<(), Vec<String>>
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::sandbox::types::DockerOverrides;
use std::path::PathBuf;

fn test_policy() -> SandboxPolicy {
Expand Down
Loading