MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / profile_with_region

Function profile_with_region

crates/cargo-lambda-remote/src/lib.rs:213–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 /// - Credentials are used from the profile
212 #[tokio::test]
213 async fn profile_with_region() {
214 setup();
215
216 let args = RemoteConfig {
217 profile: Some("apple".to_owned()),
218 region: None,
219 alias: None,
220 retry_attempts: Some(1),
221 endpoint_url: None,
222 };
223
224 let config = args.sdk_config(None).await;
225 let creds = config
226 .credentials_provider()
227 .unwrap()
228 .provide_credentials()
229 .await
230 .unwrap();
231
232 assert_eq!(config.region(), Some(&Region::from_static("ca-central-1")));
233 assert_eq!(creds.access_key_id(), "AAAAAAAAAAAAAAAAAAAA");
234 }
235
236 /// Specify a profile which does not have a region associated to it
237 /// Expectations:

Callers

nothing calls this directly

Calls 2

setupFunction · 0.85
sdk_configMethod · 0.80

Tested by

no test coverage detected