Add a forward slash at the end of the key vault URL to match what the portal returns. (#2017)

* Add a forward slash at the end of the key vault URL to match what the portal returns.

* Don't add the extra `/` in the expected token within tests.

* Fix another instance of extra `/`.

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
This commit is contained in:
Ahson Khan 2021-04-01 01:21:50 -07:00 committed by GitHub
parent 0a68af6c1f
commit 80e61d8929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ TEST_F(KeyVaultClientTest, DeleteKey)
auto cancelToken = Azure::Core::Context::GetApplicationContext().WithDeadline(duration);
auto keyResponseLRO = keyClient.StartDeleteKey(keyName);
auto expectedStatusToken = m_keyVaultUrl + "/"
auto expectedStatusToken = m_keyVaultUrl
+ std::string(Azure::Security::KeyVault::Keys::_detail::DeletedKeysPath) + "/" + keyName;
EXPECT_EQ(keyResponseLRO.GetResumeToken(), expectedStatusToken);
// poll each second until key is soft-deleted
@ -305,7 +305,7 @@ TEST_F(KeyVaultClientTest, GetDeletedKey)
auto cancelToken = Azure::Core::Context::GetApplicationContext().WithDeadline(duration);
auto keyResponseLRO = keyClient.StartDeleteKey(keyName);
auto expectedStatusToken = m_keyVaultUrl + "/"
auto expectedStatusToken = m_keyVaultUrl
+ std::string(Azure::Security::KeyVault::Keys::_detail::DeletedKeysPath) + "/" + keyName;
auto keyResponse = keyResponseLRO.PollUntilDone(std::chrono::milliseconds(1000), cancelToken);
}

View File

@ -100,7 +100,7 @@
}
},
"variables": {
"azureKeyVaultUrl": "[format('https://{0}{1}', parameters('baseName'), parameters('keyVaultDomainSuffix'))]"
"azureKeyVaultUrl": "[format('https://{0}{1}/', parameters('baseName'), parameters('keyVaultDomainSuffix'))]"
},
"resources": [
{
@ -220,4 +220,4 @@
"value": "[parameters('testApplicationOid')]"
}
}
}
}