Skip to content

Commit 3b0d3b0

Browse files
Copilotmohitc1
andauthored
Rename SovSG to GovSG in Common module (fixes AB#3565148)
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-common-for-android/sessions/5ba0899b-183d-4e79-8a83-9a47cce215ee Co-authored-by: mohitc1 <22034758+mohitc1@users.noreply.github.com>
1 parent 62d55fd commit 3b0d3b0

6 files changed

Lines changed: 35 additions & 35 deletions

File tree

common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/AzureActiveDirectory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.DELOS_CLOUD_HOST;
2929
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.PPE_CLOUD_HOST;
3030
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.PUBLIC_CLOUD_HOST;
31-
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST;
31+
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST;
3232
import static com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory.AzureActiveDirectoryCloud.US_GOV_CLOUD_HOST;
3333

3434
import com.google.gson.Gson;
@@ -116,7 +116,7 @@ public class AzureActiveDirectory
116116
US_GOV_CLOUD_HOST,
117117
BLEU_CLOUD_HOST,
118118
DELOS_CLOUD_HOST,
119-
SOVSG_CLOUD_HOST
119+
GOVSG_CLOUD_HOST
120120
)));
121121

122122
static {
@@ -134,7 +134,7 @@ private static void preSeedSovereignClouds() {
134134
for (final AzureActiveDirectoryCloud cloud : new AzureActiveDirectoryCloud[]{
135135
AzureActiveDirectoryCloud.BLEU,
136136
AzureActiveDirectoryCloud.DELOS,
137-
AzureActiveDirectoryCloud.SOVSG
137+
AzureActiveDirectoryCloud.GOVSG
138138
}) {
139139
sAadClouds.put(
140140
cloud.getPreferredNetworkHostName().toLowerCase(Locale.US),

common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/AzureActiveDirectoryCloud.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void setIsValidated(final boolean isValidated) {
124124
public static final String US_GOV_CLOUD_HOST = "login.microsoftonline.us";
125125
public static final String BLEU_CLOUD_HOST = "login.sovcloud-identity.fr";
126126
public static final String DELOS_CLOUD_HOST = "login.sovcloud-identity.de";
127-
public static final String SOVSG_CLOUD_HOST = "login.sovcloud-identity.sg";
127+
public static final String GOVSG_CLOUD_HOST = "login.sovcloud-identity.sg";
128128

129129
// These are added without network calls because they are not part of instance discovery yet.
130130
/** Bleu sovereign cloud (France). */
@@ -141,10 +141,10 @@ void setIsValidated(final boolean isValidated) {
141141
Collections.singletonList(DELOS_CLOUD_HOST)
142142
);
143143

144-
/** SovSG sovereign cloud (Singapore). */
145-
public static final AzureActiveDirectoryCloud SOVSG = new AzureActiveDirectoryCloud(
146-
SOVSG_CLOUD_HOST,
147-
SOVSG_CLOUD_HOST,
148-
Collections.singletonList(SOVSG_CLOUD_HOST)
144+
/** GovSG sovereign cloud (Singapore). */
145+
public static final AzureActiveDirectoryCloud GOVSG = new AzureActiveDirectoryCloud(
146+
GOVSG_CLOUD_HOST,
147+
GOVSG_CLOUD_HOST,
148+
Collections.singletonList(GOVSG_CLOUD_HOST)
149149
);
150150
}

common4j/src/test/com/microsoft/identity/common/java/authorities/AuthorityKnownAuthorityTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ class AuthorityKnownAuthorityTest {
5656
}
5757

5858
/**
59-
* Verifies that a sovereign cloud authority (SovSG) is recognized as known.
59+
* Verifies that a sovereign cloud authority (GovSG) is recognized as known.
6060
*/
6161
@Test
62-
fun testIsKnownAuthority_sovsgSovereignCloud() {
62+
fun testIsKnownAuthority_govsgSovereignCloud() {
6363
val authority = Authority.getAuthorityFromAuthorityUrl(
64-
"https://${AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST}/common"
64+
"https://${AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST}/common"
6565
)
6666
assertTrue(Authority.isKnownAuthority(authority))
6767
}

common4j/src/test/com/microsoft/identity/common/java/authorities/AzureActiveDirectoryAuthorityCloudTest.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class AzureActiveDirectoryAuthorityCloudTest {
5151
}
5252

5353
@Test
54-
fun testIsSameCloudAsAuthority_bothSovsg_returnsTrue() {
55-
val authority1 = createAuthority(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST)
56-
val authority2 = createAuthority(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST)
54+
fun testIsSameCloudAsAuthority_bothGovsg_returnsTrue() {
55+
val authority1 = createAuthority(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST)
56+
val authority2 = createAuthority(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST)
5757
assertTrue(authority1.isSameCloudAsAuthority(authority2))
5858
}
5959

@@ -65,16 +65,16 @@ class AzureActiveDirectoryAuthorityCloudTest {
6565
}
6666

6767
@Test
68-
fun testIsSameCloudAsAuthority_bleuVsSovsg_returnsFalse() {
68+
fun testIsSameCloudAsAuthority_bleuVsGovsg_returnsFalse() {
6969
val bleu = createAuthority(AzureActiveDirectoryCloud.BLEU_CLOUD_HOST)
70-
val sovsg = createAuthority(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST)
71-
assertFalse(bleu.isSameCloudAsAuthority(sovsg))
70+
val govsg = createAuthority(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST)
71+
assertFalse(bleu.isSameCloudAsAuthority(govsg))
7272
}
7373

7474
@Test
75-
fun testIsSameCloudAsAuthority_delosVsSovsg_returnsFalse() {
75+
fun testIsSameCloudAsAuthority_delosVsGovsg_returnsFalse() {
7676
val delos = createAuthority(AzureActiveDirectoryCloud.DELOS_CLOUD_HOST)
77-
val sovsg = createAuthority(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST)
78-
assertFalse(delos.isSameCloudAsAuthority(sovsg))
77+
val govsg = createAuthority(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST)
78+
assertFalse(delos.isSameCloudAsAuthority(govsg))
7979
}
8080
}

common4j/src/test/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/AzureActiveDirectoryCloudTest.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class AzureActiveDirectoryCloudTest {
3838
}
3939

4040
@Test
41-
fun testSovsgCloudHostConstant() {
42-
assertEquals("login.sovcloud-identity.sg", AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST)
41+
fun testGovsgCloudHostConstant() {
42+
assertEquals("login.sovcloud-identity.sg", AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST)
4343
}
4444

4545
@Test
@@ -67,21 +67,21 @@ class AzureActiveDirectoryCloudTest {
6767
}
6868

6969
@Test
70-
fun testSovsgCloudInstance() {
71-
val sovsg = AzureActiveDirectoryCloud.SOVSG
72-
assertNotNull(sovsg)
73-
assertEquals(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST, sovsg.preferredNetworkHostName)
74-
assertEquals(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST, sovsg.preferredCacheHostName)
75-
assertNotNull(sovsg.hostAliases)
76-
assertEquals(1, sovsg.hostAliases.size)
77-
assertEquals(AzureActiveDirectoryCloud.SOVSG_CLOUD_HOST, sovsg.hostAliases[0])
78-
assertTrue(sovsg.isValidated)
70+
fun testGovsgCloudInstance() {
71+
val govsg = AzureActiveDirectoryCloud.GOVSG
72+
assertNotNull(govsg)
73+
assertEquals(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST, govsg.preferredNetworkHostName)
74+
assertEquals(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST, govsg.preferredCacheHostName)
75+
assertNotNull(govsg.hostAliases)
76+
assertEquals(1, govsg.hostAliases.size)
77+
assertEquals(AzureActiveDirectoryCloud.GOVSG_CLOUD_HOST, govsg.hostAliases[0])
78+
assertTrue(govsg.isValidated)
7979
}
8080

8181
@Test
8282
fun testSovereignCloudInstancesAreDistinct() {
8383
assertNotEquals(AzureActiveDirectoryCloud.BLEU, AzureActiveDirectoryCloud.DELOS)
84-
assertNotEquals(AzureActiveDirectoryCloud.BLEU, AzureActiveDirectoryCloud.SOVSG)
85-
assertNotEquals(AzureActiveDirectoryCloud.DELOS, AzureActiveDirectoryCloud.SOVSG)
84+
assertNotEquals(AzureActiveDirectoryCloud.BLEU, AzureActiveDirectoryCloud.GOVSG)
85+
assertNotEquals(AzureActiveDirectoryCloud.DELOS, AzureActiveDirectoryCloud.GOVSG)
8686
}
8787
}

common4j/src/test/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/AzureActiveDirectoryTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class AzureActiveDirectoryTest {
6565
}
6666

6767
@Test
68-
fun testIsKnownCloudDiscoveryHost_sovsg() {
68+
fun testIsKnownCloudDiscoveryHost_govsg() {
6969
assertTrue(AzureActiveDirectory.isKnownCloudDiscoveryHost("login.sovcloud-identity.sg"))
7070
}
7171

0 commit comments

Comments
 (0)