init projectmycelium

This commit is contained in:
mik-tf
2025-09-01 21:37:01 -04:00
commit b41efb0e99
319 changed files with 128160 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
//! Test Fixtures
//!
//! Common test data and setup helpers
use crate::environment::*;
/// Common test data
pub struct TestFixtures;
impl TestFixtures {
/// Sample SSH public key for testing
pub fn sample_ssh_public_key() -> &'static str {
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7vbqajDhA+17ZAdaZcZSjJF7Dp+iSbq3 test@example.com"
}
/// Sample product data for testing
pub fn sample_product_data() -> serde_json::Value {
serde_json::json!({
"id": "test-product-1",
"name": "Test VM Instance",
"category": "compute",
"price": 15.0,
"currency": "TFC",
"description": "Test virtual machine instance"
})
}
/// Get test environment with pre-configured data
pub async fn setup_test_environment() -> Result<UXTestEnvironment, Box<dyn std::error::Error>> {
// Initialize logging
env_logger::builder()
.filter_level(log::LevelFilter::Info)
.try_init()
.ok();
// Create test environment
let environment = UXTestEnvironment::new().await?;
log::info!("Test environment setup complete");
Ok(environment)
}
}