#[ allow( unused_imports ) ]
use super::*;
#[ test ]
#[ cfg( feature = "integration" ) ]
#[ ignore = "Requires workspace secrets file" ]
fn test_fallback_behavior_integration()
{
println!("๐งช Real Credential Loading Behavior Test");
println!("=========================================");
println!("\n๐ Step 1: Testing real workspace secret loading...");
let secret = the_module::Secret::from_workspace()
.expect("INTEGRATION FAILURE: Must have real API key from workspace - no fake keys allowed");
assert!(secret.ANTHROPIC_API_KEY.starts_with("sk-ant-"),
"INTEGRATION FAILURE: Must use real Anthropic API key format");
assert!(secret.ANTHROPIC_API_KEY.len() > 30,
"INTEGRATION FAILURE: API key too short, likely fake test key");
println!("โ
Real API key loaded from workspace successfully");
println!("\n๐ง Step 2: Testing client creation with real credentials...");
let client = the_module::Client::from_workspace()
.expect("INTEGRATION FAILURE: Must have real client from workspace");
assert_eq!(client.secret().ANTHROPIC_API_KEY, secret.ANTHROPIC_API_KEY,
"INTEGRATION FAILURE: Client must use identical real credentials");
println!("โ
Client created with real credentials successfully");
println!("\n๐ Step 3: Testing real credential consistency...");
let secret2 = the_module::Secret::from_workspace()
.expect("INTEGRATION FAILURE: Consistent secret loading must work");
assert_eq!(secret.ANTHROPIC_API_KEY, secret2.ANTHROPIC_API_KEY,
"INTEGRATION FAILURE: Multiple loads must return identical real credentials");
println!("โ
Real credential loading is consistent");
println!("\n๐ Real Credential Loading Test Results");
println!("=======================================");
println!("โ
Workspace secret loading verified");
println!("โ
Client creation verified");
println!("โ
Credential consistency verified");
println!("๐ All real credential tests PASSED!");
}