Skip to content

Commit f979f5a

Browse files
committed
Fix the failing (internal) Key Vault cert-related tests.
The Get-X509FromSecret helper function was making the wrong assumption that the leaf certificate in a chain would be located at the beginning of the secret returned by the Key Vault service. Some cert-related tests started to fail when the Key Vault service changed the ordering so that the leaf certificate is now located at the end of the secret. This was not a breaking change, as the Key Vault service does not guarantee any ordering of the certs in the chain. To address this issue, this change instead searches the entire collection of certs in the secret by subject distinguished name (we replace the Get-X509FromSecret helper with Get-X509FromSecretBySubjectDistinguishedName). This increases test resiliency by not relying on any cert ordering. This change also extends the NotAfter property of a hardcoded test cert that 3 tests rely on by 1000 years, since there were test failures due to the cert having expired in October 2016.
1 parent e18eedf commit f979f5a

File tree

2 files changed

+77
-70
lines changed

2 files changed

+77
-70
lines changed

0 commit comments

Comments
 (0)