Some checks failed
CI / Check / macos-latest (push) Has been cancelled
CI / Check / ubuntu-latest (push) Has been cancelled
CI / Check / windows-latest (push) Has been cancelled
CI / Test / macos-latest (push) Has been cancelled
CI / Test / ubuntu-latest (push) Has been cancelled
CI / Test / windows-latest (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / Secrets Scan (push) Has been cancelled
CI / Install Script Smoke Test (push) Has been cancelled
95 lines
2.3 KiB
Rust
95 lines
2.3 KiB
Rust
//! Test fixtures for E2E tests.
|
|
//!
|
|
//! This module contains reusable test data and configurations.
|
|
|
|
/// Manifest for a chat agent with extended capabilities.
|
|
pub const CHAT_AGENT_MANIFEST: &str = r#"
|
|
name = "chat-agent"
|
|
version = "0.1.0"
|
|
description = "Chat agent with extended capabilities"
|
|
author = "test"
|
|
module = "builtin:chat"
|
|
|
|
[model]
|
|
provider = "ollama"
|
|
model = "test-model"
|
|
system_prompt = "You are a helpful chat agent. Be concise and friendly."
|
|
|
|
[capabilities]
|
|
tools = ["file_read", "file_write"]
|
|
memory_read = ["*"]
|
|
memory_write = ["self.*"]
|
|
"#;
|
|
|
|
/// Manifest for a code assistant agent.
|
|
pub const CODE_AGENT_MANIFEST: &str = r#"
|
|
name = "code-agent"
|
|
version = "0.1.0"
|
|
description = "Code assistant agent"
|
|
author = "test"
|
|
module = "builtin:chat"
|
|
|
|
[model]
|
|
provider = "ollama"
|
|
model = "test-model"
|
|
system_prompt = "You are a code assistant. Help with programming tasks."
|
|
|
|
[capabilities]
|
|
tools = ["file_read", "file_write", "shell_exec"]
|
|
memory_read = ["*"]
|
|
memory_write = ["self.*"]
|
|
"#;
|
|
|
|
/// Invalid manifest for error testing.
|
|
pub const INVALID_MANIFEST: &str = "this is {{ not valid toml";
|
|
|
|
/// Manifest with missing required fields.
|
|
pub const INCOMPLETE_MANIFEST: &str = r#"
|
|
name = "incomplete-agent"
|
|
# Missing version, description, etc.
|
|
"#;
|
|
|
|
/// Sample workflow JSON for testing.
|
|
pub const SAMPLE_WORKFLOW_JSON: &str = r#"
|
|
{
|
|
"name": "sample-workflow",
|
|
"description": "A sample workflow for testing",
|
|
"steps": [
|
|
{
|
|
"name": "greet",
|
|
"agent_name": "test-agent",
|
|
"prompt": "Say hello",
|
|
"mode": "sequential",
|
|
"timeout_secs": 30
|
|
},
|
|
{
|
|
"name": "process",
|
|
"agent_name": "test-agent",
|
|
"prompt": "Process: {{input}}",
|
|
"mode": "sequential",
|
|
"timeout_secs": 60
|
|
}
|
|
]
|
|
}
|
|
"#;
|
|
|
|
/// Sample trigger JSON for testing.
|
|
pub const SAMPLE_TRIGGER_JSON: &str = r#"
|
|
{
|
|
"agent_id": "00000000-0000-0000-0000-000000000001",
|
|
"pattern": "webhook",
|
|
"prompt_template": "Handle webhook: {{payload}}",
|
|
"max_fires": 10
|
|
}
|
|
"#;
|
|
|
|
/// Sample schedule JSON for testing.
|
|
pub const SAMPLE_SCHEDULE_JSON: &str = r#"
|
|
{
|
|
"agent_id": "00000000-0000-0000-0000-000000000001",
|
|
"cron": "0 */5 * * * *",
|
|
"prompt": "Scheduled maintenance check",
|
|
"enabled": true
|
|
}
|
|
"#;
|