in proxy_agent/src/key_keeper/key.rs [1345:1376]
fn key_test() {
let key_response = r#"{
"authorizationScheme": "Azure-HMAC-SHA256",
"guid": "9cf81e97-0316-4ad3-94a7-8ccbdee8ccbf",
"incarnationId": 1,
"issued": "2021-05-05T 12:00:00Z",
"key": "4A404E635266556A586E3272357538782F413F4428472B4B6250645367566B59"
}"#;
let key: Key = serde_json::from_str(key_response).unwrap();
assert_eq!(
constants::AUTHORIZATION_SCHEME.to_string(),
key.authorizationScheme,
"authorizationScheme mismatch"
);
assert_eq!(
"9cf81e97-0316-4ad3-94a7-8ccbdee8ccbf".to_string(),
key.guid,
"guid mismatch"
);
assert_eq!(Some(1), key.incarnationId, "incarnationId mismatch");
assert_eq!(
"2021-05-05T 12:00:00Z".to_string(),
key.issued,
"issued mismatch"
);
assert_eq!(
"4A404E635266556A586E3272357538782F413F4428472B4B6250645367566B59".to_string(),
key.key,
"key mismatch"
);
}