Helper function to get a test client
()
| 160 | |
| 161 | // Helper function to get a test client |
| 162 | fn get_test_client() -> TappdClient { |
| 163 | // Check for simulator endpoint first |
| 164 | if let Ok(endpoint) = env::var("TAPPD_SIMULATOR_ENDPOINT") { |
| 165 | println!("Using TAPPD_SIMULATOR_ENDPOINT: {}", endpoint); |
| 166 | return TappdClient::new(Some(&endpoint)); |
| 167 | } |
| 168 | |
| 169 | // Check for DSTACK_SIMULATOR_ENDPOINT as fallback |
| 170 | if let Ok(endpoint) = env::var("DSTACK_SIMULATOR_ENDPOINT") { |
| 171 | println!("Using DSTACK_SIMULATOR_ENDPOINT as fallback: {}", endpoint); |
| 172 | return TappdClient::new(Some(&endpoint)); |
| 173 | } |
| 174 | |
| 175 | // Use default endpoint |
| 176 | println!("Using default tappd endpoint: /var/run/tappd.sock"); |
| 177 | TappdClient::new(None) |
| 178 | } |
| 179 | |
| 180 | #[test] |
| 181 | fn test_derive_key_response_decode() { |
no outgoing calls
no test coverage detected