Add note on why integration test is ignored, check token and expiration for instance profile integration test.
@@ -4,6 +4,8 @@ use rusoto_credential::{InstanceMetadataProvider, ProvideAwsCredentials};
use std::time::Duration;
use tokio_core::reactor::Core;
+// This test is marked ignored because it requires special setup.
+// It's run with the `credential_integration_test` Makefile target.
#[test]
#[ignore]
fn it_fetches_basic_role() {
@@ -21,4 +23,10 @@ fn it_fetches_basic_role() {
assert_eq!(creds.aws_access_key_id(), "Access_key_id_value");
assert_eq!(creds.aws_secret_access_key(), "Secret_access_key_value");
+ assert_eq!(creds.token().as_ref(), Some(&"AAAAA".to_string()));
+ let dt = match creds.expires_at().as_ref() {
+ Some(d) => d.to_string(),
+ None => panic!("Expiration should be present"),
+ };
+ assert_eq!(dt, "2015-08-04 06:32:37 UTC");
}
