Skip to content

Commit 669770e

Browse files
committed
Merge branch 'dev' into avdunn/merge-conflicts
2 parents 5fc9dae + 3762d5c commit 669770e

File tree

7 files changed

+28
-1
lines changed

7 files changed

+28
-1
lines changed

msal4j-sdk/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3333
<skip.unit.tests>false</skip.unit.tests>
3434
<skip.integration.tests>false</skip.integration.tests>
35+
36+
<!-- Test category control properties. -->
37+
<!-- Disable test categories by setting to 'true' in the mvn command (i.e., mvn verify -Dadfs.disabled=true)-->
38+
<adfs.disabled>false</adfs.disabled>
3539
</properties>
3640

3741
<dependencies>
@@ -279,6 +283,9 @@
279283
</executions>
280284
<configuration>
281285
<skipTests>${skip.integration.tests}</skipTests>
286+
<systemPropertyVariables>
287+
<adfs.disabled>${adfs.disabled}</adfs.disabled>
288+
</systemPropertyVariables>
282289
</configuration>
283290
</plugin>
284291
<plugin>

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AcquireTokenInteractiveIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.junit.jupiter.api.AfterEach;
88
import org.junit.jupiter.api.BeforeAll;
99
import org.junit.jupiter.api.BeforeEach;
10+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
1011
import org.slf4j.Logger;
1112
import org.slf4j.LoggerFactory;
1213
import org.junit.jupiter.api.Test;
@@ -56,13 +57,15 @@ void acquireTokenInteractive_ManagedUser(String environment) {
5657
}
5758

5859
@Test()
60+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
5961
void acquireTokenInteractive_ADFSv2019_OnPrem() {
6062
User user = labUserProvider.getOnPremAdfsUser(FederationProvider.ADFS_2019);
6163
assertAcquireTokenCommon(user, TestConstants.ADFS_AUTHORITY, TestConstants.ADFS_SCOPE);
6264
}
6365

6466
@ParameterizedTest
6567
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
68+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
6669
void acquireTokenInteractive_ADFSv2019_Federated(String environment) {
6770
cfg = new Config(environment);
6871

@@ -72,6 +75,7 @@ void acquireTokenInteractive_ADFSv2019_Federated(String environment) {
7275

7376
@ParameterizedTest
7477
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
78+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
7579
void acquireTokenInteractive_ADFSv4_Federated(String environment) {
7680
cfg = new Config(environment);
7781

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AcquireTokenSilentIT.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import labapi.*;
77
import org.junit.jupiter.api.Test;
88
import org.junit.jupiter.api.TestInstance;
9+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
910
import org.junit.jupiter.params.ParameterizedTest;
1011
import org.junit.jupiter.params.provider.MethodSource;
1112
import org.junit.jupiter.api.BeforeAll;
@@ -100,6 +101,7 @@ void acquireTokenSilent_ForceRefresh(String environment) throws Exception {
100101

101102
@ParameterizedTest
102103
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
104+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
103105
void acquireTokenSilent_MultipleAccountsInCache_UseCorrectAccount(String environment) throws Exception {
104106
cfg = new Config(environment);
105107

@@ -123,6 +125,7 @@ void acquireTokenSilent_MultipleAccountsInCache_UseCorrectAccount(String environ
123125

124126
@ParameterizedTest
125127
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
128+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
126129
void acquireTokenSilent_ADFS2019(String environment) throws Exception {
127130
cfg = new Config(environment);
128131

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AuthorizationCodeIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.junit.jupiter.api.AfterEach;
88
import org.junit.jupiter.api.BeforeAll;
99
import org.junit.jupiter.api.BeforeEach;
10+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
1011
import org.slf4j.Logger;
1112
import org.slf4j.LoggerFactory;
1213
import org.junit.jupiter.api.Test;
@@ -56,13 +57,15 @@ public void acquireTokenWithAuthorizationCode_ManagedUser(String environment) {
5657
}
5758

5859
@Test
60+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
5961
public void acquireTokenWithAuthorizationCode_ADFSv2019_OnPrem() {
6062
User user = labUserProvider.getOnPremAdfsUser(FederationProvider.ADFS_2019);
6163
assertAcquireTokenADFS2019(user);
6264
}
6365

6466
@ParameterizedTest
6567
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
68+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
6669
public void acquireTokenWithAuthorizationCode_ADFSv2019_Federated(String environment) {
6770
cfg = new Config(environment);
6871

@@ -72,6 +75,7 @@ public void acquireTokenWithAuthorizationCode_ADFSv2019_Federated(String environ
7275

7376
@ParameterizedTest
7477
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
78+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
7579
public void acquireTokenWithAuthorizationCode_ADFSv4_Federated(String environment) {
7680
cfg = new Config(environment);
7781

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/DeviceCodeIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.slf4j.LoggerFactory;
1313
import org.junit.jupiter.api.Test;
1414
import org.junit.jupiter.api.TestInstance;
15+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
1516
import org.junit.jupiter.params.ParameterizedTest;
1617
import org.junit.jupiter.params.provider.MethodSource;
1718
import org.junit.jupiter.api.BeforeAll;
@@ -54,6 +55,7 @@ void DeviceCodeFlowADTest(String environment) throws Exception {
5455
}
5556

5657
@Test()
58+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
5759
void DeviceCodeFlowADFSv2019Test() throws Exception {
5860

5961
User user = labUserProvider.getOnPremAdfsUser(FederationProvider.ADFS_2019);

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/TokenCacheIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.junit.jupiter.api.Test;
88
import org.junit.jupiter.api.BeforeAll;
99
import org.junit.jupiter.api.TestInstance;
10+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
1011

1112
import static org.junit.jupiter.api.Assertions.assertEquals;
1213
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -59,6 +60,7 @@ void singleAccountInCache_RemoveAccountTest() throws Exception {
5960
}
6061

6162
@Test
63+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
6264
void twoAccountsInCache_RemoveAccountTest() throws Exception {
6365

6466
User managedUser = labUserProvider.getDefaultUser();
@@ -108,6 +110,7 @@ void twoAccountsInCache_RemoveAccountTest() throws Exception {
108110
}
109111

110112
@Test
113+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
111114
void twoAccountsInCache_SameUserDifferentTenants_RemoveAccountTest() throws Exception {
112115

113116
UserQueryParameters query = new UserQueryParameters();
@@ -172,6 +175,7 @@ void twoAccountsInCache_SameUserDifferentTenants_RemoveAccountTest() throws Exce
172175
}
173176

174177
@Test
178+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
175179
void retrieveAccounts_ADFSOnPrem() throws Exception {
176180
UserQueryParameters query = new UserQueryParameters();
177181
query.parameters.put(UserQueryParameters.FEDERATION_PROVIDER, FederationProvider.ADFS_2019);

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/UsernamePasswordIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import labapi.*;
77
import org.junit.jupiter.api.Test;
88
import org.junit.jupiter.api.TestInstance;
9+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
910
import org.junit.jupiter.params.ParameterizedTest;
1011
import org.junit.jupiter.params.provider.MethodSource;
1112
import org.junit.jupiter.api.BeforeAll;
1213
import static org.junit.jupiter.api.Assertions.assertEquals;
13-
import static org.junit.jupiter.api.Assertions.assertNotNull;
1414

1515
import java.util.Collections;
1616
import java.util.HashMap;
@@ -39,6 +39,7 @@ void acquireTokenWithUsernamePassword_Managed(String environment) throws Excepti
3939

4040
@ParameterizedTest
4141
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
42+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
4243
void acquireTokenWithUsernamePassword_ADFSv2019_Federated(String environment) throws Exception {
4344
cfg = new Config(environment);
4445

@@ -53,6 +54,7 @@ void acquireTokenWithUsernamePassword_ADFSv2019_Federated(String environment) th
5354
}
5455

5556
@Test
57+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
5658
void acquireTokenWithUsernamePassword_ADFSv2019_OnPrem() throws Exception {
5759
UserQueryParameters query = new UserQueryParameters();
5860
query.parameters.put(UserQueryParameters.FEDERATION_PROVIDER, FederationProvider.ADFS_2019);
@@ -65,6 +67,7 @@ void acquireTokenWithUsernamePassword_ADFSv2019_OnPrem() throws Exception {
6567

6668
@ParameterizedTest
6769
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
70+
@DisabledIfSystemProperty(named = "adfs.disabled", matches = "true")
6871
void acquireTokenWithUsernamePassword_ADFSv4(String environment) throws Exception {
6972
cfg = new Config(environment);
7073

0 commit comments

Comments
 (0)