MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / get_test_client

Function get_test_client

sdk/rust/tests/test_tappd_client.rs:162–178  ·  view source on GitHub ↗

Helper function to get a test client

()

Source from the content-addressed store, hash-verified

160
161// Helper function to get a test client
162fn 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]
181fn test_derive_key_response_decode() {

Calls

no outgoing calls

Tested by

no test coverage detected