init projectmycelium
This commit is contained in:
42
tests/tests_archive/ux_suite/utils/test_fixtures.rs
Normal file
42
tests/tests_archive/ux_suite/utils/test_fixtures.rs
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user