MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / test

Method test

crates/chat-cli/src/auth/builder_id.rs:307–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305
306 #[cfg(test)]
307 fn test() -> Self {
308 Self {
309 access_token: Secret("test_access_token".to_string()),
310 expires_at: time::OffsetDateTime::now_utc() + time::Duration::minutes(60),
311 refresh_token: Some(Secret("test_refresh_token".to_string())),
312 region: Some(OIDC_BUILDER_ID_REGION.to_string()),
313 start_url: Some(START_URL.to_string()),
314 oauth_flow: OAuthFlow::DeviceCode,
315 scopes: Some(SCOPES.iter().map(|s| (*s).to_owned()).collect()),
316 }
317 }
318
319 /// Load the token from the keychain, refresh the token if it is expired and return it
320 pub async fn load(

Callers

nothing calls this directly

Calls 3

SecretClass · 0.85
to_stringMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected