Skip to content

Commit 26c3b77

Browse files
Copilotrujche
andauthored
Fix String[] → String type for scopes variable and use AuthProperty.SCOPES.getPropertyKey() in test constants
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-java/sessions/12207d29-e188-4b4e-b9bf-f2360f7f01b4 Co-authored-by: rujche <171773178+rujche@users.noreply.github.com>
1 parent cc3ef95 commit 26c3b77

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ class JdbcPropertiesBeanPostProcessorTest {
4444
private static final String POSTGRESQL_ASSUME_MIN_SERVER_VERSION = POSTGRESQL_PROPERTY_NAME_ASSUME_MIN_SERVER_VERSION + "="
4545
+ POSTGRESQL_PROPERTY_VALUE_ASSUME_MIN_SERVER_VERSION;
4646
protected static final String MANAGED_IDENTITY_ENABLED_DEFAULT = "azure.managedIdentityEnabled=false";
47-
protected static final String SCOPES_DEFAULT = "azure.scopes=https://ossrdbms-aad.database.windows.net/.default";
48-
private static final String SCOPES_CHINA = "azure.scopes=https://ossrdbms-aad.database.chinacloudapi.cn/.default";
49-
private static final String SCOPES_US_GOVERNMENT = "azure.scopes=https://ossrdbms-aad.database.usgovcloudapi.net/.default";
47+
protected static final String SCOPES_DEFAULT = AuthProperty.SCOPES.getPropertyKey() + "="
48+
+ "https://ossrdbms-aad.database.windows.net/.default";
49+
private static final String SCOPES_CHINA = AuthProperty.SCOPES.getPropertyKey() + "="
50+
+ "https://ossrdbms-aad.database.chinacloudapi.cn/.default";
51+
private static final String SCOPES_US_GOVERNMENT = AuthProperty.SCOPES.getPropertyKey() + "="
52+
+ "https://ossrdbms-aad.database.usgovcloudapi.net/.default";
5053
private static final String DEFAULT_PASSWORDLESS_PROPERTIES_SUFFIX = ".spring.datasource.azure";
5154
private MockEnvironment mockEnvironment;
5255

sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/util/AzurePasswordlessPropertiesUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static <T extends PasswordlessProperties> void copyAzureCommonPropertiesI
5151
copyPropertiesIgnoreNull(source.getProfile().getEnvironment(), target.getProfile().getEnvironment());
5252
copyPropertiesIgnoreNull(source.getCredential(), target.getCredential());
5353

54-
String[] scopes = source.getScopes();
54+
String scopes = source.getScopes();
5555
if (scopes != null) {
5656
target.setScopes(scopes);
5757
}

0 commit comments

Comments
 (0)