fabro/lib/crates/fabro-exe/tests/integration.rs
Bryan Helmkamp 28884ae093 rename Arc to Fabro in all Rust crates, symbols, env vars, and supporting files
- Rename 20 crate directories lib/crates/arc-* → fabro-*
- Update all Cargo.toml: crate names, dep paths, feature flags, bin name
- Rename arc_server module → fabro_server in fabro-llm
- ArcError → FabroError across 30+ files
- ARC_VERSION/ARC_GIT_SHA/ARC_BUILD_DATE → FABRO_* constants
- All use/qualified paths: arc_agent:: → fabro_agent::, etc. (~1500 occurrences)
- Env vars ARC_* → FABRO_* in string literals and shell scripts
- String literals: X-Arc-Demo, arc-bot, arc@local, arc-web, arc-mcp, etc.
- Path strings: .arc/ → .fabro/, arc.toml → fabro.toml, refs/arc/ → refs/fabro/
- arc-api.yaml → fabro-api.yaml (OpenAPI spec)
- skills/arc-create-workflow → fabro-create-workflow
- trycmd fixtures: $ arc → $ fabro
- Inline snapshots (insta) updated
- CI, Docker, install.sh, scripts, CLAUDE.md, AGENTS.md
- TypeScript app: env vars, headers, JWT issuer
- Docs: page slugs, git refs, config paths, sandbox names, repo URLs
- Repo references: brynary/arc → fabro-sh/fabro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:58 -04:00

49 lines
1.6 KiB
Rust

use fabro_agent::sandbox::Sandbox;
use fabro_exe::{ExeConfig, ExeSandbox, OpensshRunner};
/// Full lifecycle test against a real exe.dev account.
/// Requires SSH agent with exe.dev credentials.
///
/// Run with: cargo test -p arc-exe -- --ignored
#[tokio::test]
#[ignore]
async fn exe_sandbox_full_lifecycle() {
let mgmt_ssh = OpensshRunner::connect_raw("exe.dev")
.await
.expect("SSH to exe.dev failed — is your SSH agent running?");
let sandbox = ExeSandbox::new(Box::new(mgmt_ssh), ExeConfig::default(), None, None, None);
// Initialize (creates VM)
sandbox.initialize().await.unwrap();
assert!(!sandbox.sandbox_info().is_empty());
assert_eq!(sandbox.platform(), "linux");
// exec_command
let result = sandbox
.exec_command("echo hello", 10_000, None, None, None)
.await
.unwrap();
assert_eq!(result.stdout.trim(), "hello");
assert_eq!(result.exit_code, 0);
// write_file + read_file
sandbox
.write_file("test.txt", "line1\nline2\nline3")
.await
.unwrap();
let content = sandbox.read_file("test.txt", None, None).await.unwrap();
assert!(content.contains("1 | line1"));
assert!(content.contains("2 | line2"));
// file_exists
assert!(sandbox.file_exists("test.txt").await.unwrap());
assert!(!sandbox.file_exists("nonexistent.txt").await.unwrap());
// delete_file
sandbox.delete_file("test.txt").await.unwrap();
assert!(!sandbox.file_exists("test.txt").await.unwrap());
// Cleanup (destroys VM)
sandbox.cleanup().await.unwrap();
}