2026-02-08 20:18:46 +00:00
|
|
|
//! Rustelo Feature Architecture Testing Suite
|
|
|
|
|
//! Comprehensive tests for feature management, integration, and CLI
|
|
|
|
|
|
|
|
|
|
mod integration {
|
|
|
|
|
mod feature_installation;
|
|
|
|
|
mod dependency_resolution;
|
|
|
|
|
mod config_merging;
|
|
|
|
|
mod resource_integration;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod cli {
|
|
|
|
|
mod feature_commands;
|
|
|
|
|
mod integration_commands;
|
|
|
|
|
mod error_handling;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod features {
|
|
|
|
|
mod analytics;
|
|
|
|
|
mod smart_build;
|
|
|
|
|
mod interaction_tests;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod helpers;
|
|
|
|
|
|
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
use tempfile::TempDir;
|
|
|
|
|
|
|
|
|
|
/// Create a temporary test project with basic structure
|
|
|
|
|
pub fn create_test_project() -> anyhow::Result<TempDir> {
|
|
|
|
|
let temp_dir = TempDir::new()?;
|
|
|
|
|
let project_root = temp_dir.path();
|
2026-02-08 20:37:49 +00:00
|
|
|
|
2026-02-08 20:18:46 +00:00
|
|
|
// Create basic project structure
|
|
|
|
|
std::fs::create_dir_all(project_root.join("features"))?;
|
|
|
|
|
std::fs::create_dir_all(project_root.join("registry"))?;
|
|
|
|
|
std::fs::create_dir_all(project_root.join("foundation/crates"))?;
|
|
|
|
|
std::fs::create_dir_all(project_root.join("framework/crates"))?;
|
2026-02-08 20:37:49 +00:00
|
|
|
|
2026-02-08 20:18:46 +00:00
|
|
|
// Create minimal Cargo.toml
|
|
|
|
|
let cargo_toml = r#"
|
|
|
|
|
[workspace]
|
|
|
|
|
resolver = "2"
|
|
|
|
|
members = []
|
|
|
|
|
|
|
|
|
|
[workspace.dependencies]
|
|
|
|
|
"#;
|
|
|
|
|
std::fs::write(project_root.join("Cargo.toml"), cargo_toml)?;
|
2026-02-08 20:37:49 +00:00
|
|
|
|
2026-02-08 20:18:46 +00:00
|
|
|
// Create minimal .env
|
|
|
|
|
let env_content = "# Test project environment\n";
|
|
|
|
|
std::fs::write(project_root.join(".env"), env_content)?;
|
2026-02-08 20:37:49 +00:00
|
|
|
|
2026-02-08 20:18:46 +00:00
|
|
|
Ok(temp_dir)
|
2026-02-08 20:37:49 +00:00
|
|
|
}
|