-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed flaky Key Vault live tests. (#24606)
* Removed the `createRsaKeyWithPublicExponent()` test from `KeyClientTest` and `KeyAsyncClientTest`, as setting a public exponent is currently only available for Managed HSM. * Added a call to `sleepIfRunningAgainstService()` in `KeyAsyncClientTest`'s `updateKey()` and `updateDisabledKey()` to avoid calling `getKey()` before the service has had a chance to update a given key. * Removed sleep call and refactored 'updateKey' tests instead.
- Loading branch information
Showing
10 changed files
with
90 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
.../test/resources/session-records/KeyAsyncClientTest.createRsaKeyWithPublicExponent[1].json
This file was deleted.
Oops, something went wrong.
78 changes: 13 additions & 65 deletions
78
...ault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateDisabledKey[1].json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,56 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "POST", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/create?api-version=7.3-preview", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey2986032b8/create?api-version=7.3-preview", | ||
"Headers" : { | ||
"User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", | ||
"Content-Type" : "application/json" | ||
}, | ||
"Response" : { | ||
"content-length" : "427", | ||
"content-length" : "416", | ||
"X-Content-Type-Options" : "nosniff", | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"StatusCode" : "200", | ||
"Date" : "Tue, 05 Oct 2021 01:54:23 GMT", | ||
"Date" : "Thu, 07 Oct 2021 02:34:29 GMT", | ||
"Strict-Transport-Security" : "max-age=31536000;includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"x-ms-keyvault-region" : "centralus", | ||
"x-ms-keyvault-region" : "westus", | ||
"x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", | ||
"Expires" : "-1", | ||
"x-ms-request-id" : "c7ce2095-8533-40eb-ab05-99f3c5de455c", | ||
"x-ms-request-id" : "7ee9176f-2381-4306-bda7-9107209f15ca", | ||
"x-ms-keyvault-service-version" : "1.9.132.3", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", | ||
"Content-Type" : "application/json; charset=utf-8", | ||
"X-Powered-By" : "ASP.NET" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "GET", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/?api-version=7.3-preview", | ||
"Headers" : { | ||
"User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", | ||
"Content-Type" : "application/json" | ||
}, | ||
"Response" : { | ||
"content-length" : "427", | ||
"X-Content-Type-Options" : "nosniff", | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"StatusCode" : "200", | ||
"Date" : "Tue, 05 Oct 2021 01:54:23 GMT", | ||
"Strict-Transport-Security" : "max-age=31536000;includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"x-ms-keyvault-region" : "centralus", | ||
"x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", | ||
"Expires" : "-1", | ||
"x-ms-request-id" : "96f60166-ee2f-4bf0-9b9a-646309e626eb", | ||
"x-ms-keyvault-service-version" : "1.9.132.3", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"mN_5P7JFoIG_7odyRnwRKMZvKfHHfBTNJ3sud3tyZYI\",\"y\":\"QwyOK5MRqMOepjRnNGoq7LJi4VDoacXb-DK2xIxJPGI\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633574070,\"updated\":1633574070,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", | ||
"Content-Type" : "application/json; charset=utf-8", | ||
"X-Powered-By" : "ASP.NET" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "PATCH", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211?api-version=7.3-preview", | ||
"Headers" : { | ||
"User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", | ||
"Content-Type" : "application/json" | ||
}, | ||
"Response" : { | ||
"content-length" : "427", | ||
"X-Content-Type-Options" : "nosniff", | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"StatusCode" : "200", | ||
"Date" : "Tue, 05 Oct 2021 01:54:23 GMT", | ||
"Strict-Transport-Security" : "max-age=31536000;includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"x-ms-keyvault-region" : "centralus", | ||
"x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", | ||
"Expires" : "-1", | ||
"x-ms-request-id" : "9a92ad6d-06b8-4c6a-b418-579843669ab8", | ||
"x-ms-keyvault-service-version" : "1.9.132.3", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398864,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", | ||
"Content-Type" : "application/json; charset=utf-8", | ||
"X-Powered-By" : "ASP.NET" | ||
}, | ||
"Exception" : null | ||
}, { | ||
"Method" : "GET", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/?api-version=7.3-preview", | ||
"Uri" : "https://REDACTED.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60?api-version=7.3-preview", | ||
"Headers" : { | ||
"User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", | ||
"Content-Type" : "application/json" | ||
}, | ||
"Response" : { | ||
"content-length" : "427", | ||
"content-length" : "416", | ||
"X-Content-Type-Options" : "nosniff", | ||
"Pragma" : "no-cache", | ||
"retry-after" : "0", | ||
"StatusCode" : "200", | ||
"Date" : "Tue, 05 Oct 2021 01:54:24 GMT", | ||
"Date" : "Thu, 07 Oct 2021 02:34:30 GMT", | ||
"Strict-Transport-Security" : "max-age=31536000;includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"x-ms-keyvault-region" : "centralus", | ||
"x-ms-keyvault-region" : "westus", | ||
"x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", | ||
"Expires" : "-1", | ||
"x-ms-request-id" : "5ebc167f-d928-4966-9e8f-4f45fd053987", | ||
"x-ms-request-id" : "00bc1d35-3d76-4334-80f5-bb0135c71e62", | ||
"x-ms-keyvault-service-version" : "1.9.132.3", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398864,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", | ||
"Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"mN_5P7JFoIG_7odyRnwRKMZvKfHHfBTNJ3sud3tyZYI\",\"y\":\"QwyOK5MRqMOepjRnNGoq7LJi4VDoacXb-DK2xIxJPGI\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633574070,\"updated\":1633574070,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", | ||
"Content-Type" : "application/json; charset=utf-8", | ||
"X-Powered-By" : "ASP.NET" | ||
}, | ||
"Exception" : null | ||
} ], | ||
"variables" : [ "testkey255915b59" ] | ||
"variables" : [ "testkey2986032b8" ] | ||
} |
Oops, something went wrong.