Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix smoke test compile issue aug 2020 #14662

Merged
merged 2 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/smoke-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.0.3</version>
<version>1.1.0</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danieljurek Should we add Jim's version tags to these so when we release, it doesn't break?

</dependency>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-security-keyvault-secrets</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>

<dependency>
Expand Down
12 changes: 6 additions & 6 deletions common/smoke-tests/src/main/java/com/azure/KeyVaultSecrets.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License.
package com.azure;

import com.azure.identity.AzureAuthorityHosts;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.KnownAuthorityHosts;
import com.azure.security.keyvault.secrets.SecretClient;
import com.azure.security.keyvault.secrets.SecretClientBuilder;
import com.azure.security.keyvault.secrets.models.DeletedSecret;
Expand All @@ -24,10 +24,10 @@ public class KeyVaultSecrets {
private static final Logger LOGGER = LoggerFactory.getLogger(KeyVaultSecrets.class);

private static HashMap<String, String> AUTHORITY_HOST_MAP = new HashMap<String, String>() {{
put("AzureCloud", KnownAuthorityHosts.AZURE_CLOUD);
put("AzureChinaCloud", KnownAuthorityHosts.AZURE_CHINA_CLOUD);
put("AzureGermanCloud", KnownAuthorityHosts.AZURE_GERMAN_CLOUD);
put("AzureUSGovernment", KnownAuthorityHosts.AZURE_US_GOVERNMENT);
put("AzureCloud", AzureAuthorityHosts.AZURE_PUBLIC_CLOUD);
put("AzureChinaCloud", AzureAuthorityHosts.AZURE_CHINA);
put("AzureGermanCloud", AzureAuthorityHosts.AZURE_GERMANY);
put("AzureUSGovernment", AzureAuthorityHosts.AZURE_GOVERNMENT);
}};

private static void setSecret() {
Expand Down Expand Up @@ -59,7 +59,7 @@ public static void main(String[] args) {
// Configure authority host from AZURE_CLOUD
String azureCloud = System.getenv("AZURE_CLOUD");
String authorityHost = AUTHORITY_HOST_MAP.getOrDefault(
azureCloud, KnownAuthorityHosts.AZURE_CLOUD);
azureCloud, AzureAuthorityHosts.AZURE_PUBLIC_CLOUD);


/* DefaultAzureCredentialBuilder() is expecting the following environment variables:
Expand Down