Make ApiVersion field within client options settable for keyvault packages (#6130)
This commit is contained in:
parent
cb655deb44
commit
c168d736dd
@ -8,6 +8,8 @@
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
- Allow the `ApiVersion` field within `SettingsClientOptions` to be settable.
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.0.0-beta.5 (2024-08-06)
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Administra
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.4"};
|
||||
std::string ApiVersion{"7.4"};
|
||||
};
|
||||
|
||||
}}}} // namespace Azure::Security::KeyVault::Administration
|
||||
|
||||
@ -107,3 +107,19 @@ TEST_F(SettingsClientTest, UpdateSetting_RECORDEDONLY_)
|
||||
SkipTest();
|
||||
}
|
||||
}
|
||||
|
||||
TEST(KeyVaultSettingsClientTest, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// Default - 7.4
|
||||
EXPECT_NO_THROW(auto options = SettingsClientOptions(); SettingsClient settingsClient(
|
||||
"http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.4"););
|
||||
|
||||
// 7.4
|
||||
EXPECT_NO_THROW(
|
||||
auto options = SettingsClientOptions(); options.ApiVersion = "7.4";
|
||||
SettingsClient settingsClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.4"););
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
- Allow the `ApiVersion` field within `CertificateClientOptions` to be settable.
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.3.0-beta.2 (2024-06-11)
|
||||
|
||||
@ -29,7 +29,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.5"};
|
||||
std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
}}}} // namespace Azure::Security::KeyVault::Certificates
|
||||
|
||||
@ -900,8 +900,14 @@ TEST_F(KeyVaultCertificateClientTest, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.5
|
||||
// Default - 7.5
|
||||
EXPECT_NO_THROW(auto options = CertificateClientOptions(); CertificateClient certificateClient(
|
||||
"http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
|
||||
// 7.4
|
||||
EXPECT_NO_THROW(
|
||||
auto options = CertificateClientOptions(); options.ApiVersion = "7.4";
|
||||
CertificateClient certificateClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.4"););
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
- Allow the `ApiVersion` field within `KeyClientOptions` to be settable.
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.5.0-beta.2 (2024-06-11)
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.5"};
|
||||
std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -32,10 +32,15 @@ TEST(KeyVaultKeyClientUnitTest, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.5
|
||||
// Default - 7.5
|
||||
EXPECT_NO_THROW(auto options = KeyClientOptions();
|
||||
KeyClient keyClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
|
||||
// 7.4
|
||||
EXPECT_NO_THROW(auto options = KeyClientOptions(); options.ApiVersion = "7.4";
|
||||
KeyClient keyClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.4"););
|
||||
}
|
||||
|
||||
TEST(KeyVaultKeyClientUnitTest, GetUrl)
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
- Allow the `ApiVersion` field within `SecretClientOptions` to be settable.
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.3.0-beta.2 (2024-06-11)
|
||||
|
||||
@ -22,7 +22,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Secrets {
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.5"};
|
||||
std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -30,10 +30,15 @@ TEST(SecretClient, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.5
|
||||
// Default - 7.5
|
||||
EXPECT_NO_THROW(auto options = SecretClientOptions();
|
||||
SecretClient SecretClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
|
||||
// 7.4
|
||||
EXPECT_NO_THROW(auto options = SecretClientOptions(); options.ApiVersion = "7.4";
|
||||
SecretClient SecretClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.4"););
|
||||
}
|
||||
|
||||
TEST(SecretClient, GetUrl)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user