Skip to content

Commit

Permalink
Merge branch 'master' into release_5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiishamrai-okta authored Aug 27, 2021
2 parents 28fe2b9 + b140ed9 commit 3135793
Show file tree
Hide file tree
Showing 22 changed files with 149 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ class ApplicationsIT extends ITSupport {
}
}

@Test
@Test (groups = "group1")
void testClientIsReady() {
assertThat "Expected client to be ready", client.isReady({ -> client.listApplications() })
}

@Test
@Test (groups = "group1")
void basicListTest() {
// Create a resource
def resource = create(client, client.instantiate(AutoLoginApplication)
Expand Down Expand Up @@ -136,7 +136,7 @@ class ApplicationsIT extends ITSupport {
assertThat "New resource with id ${resource.getId()} was not found in list resource.", optional.isPresent()
}

@Test
@Test (groups = "group1")
void crudOpenIdConnect() {
doCrudTest(client.instantiate(OpenIdConnectApplication)
.setSettings(client.instantiate(OpenIdConnectApplicationSettings)
Expand All @@ -160,7 +160,7 @@ class ApplicationsIT extends ITSupport {
.setTokenEndpointAuthMethod(OAuthEndpointAuthenticationMethod.CLIENT_SECRET_POST))))
}

@Test
@Test (groups = "group1")
void crudAutoLogin() {
doCrudTest(client.instantiate(AutoLoginApplication)
.setVisibility(client.instantiate(ApplicationVisibility)
Expand Down Expand Up @@ -193,7 +193,7 @@ class ApplicationsIT extends ITSupport {
.setUsernameAttribute("username"))))
}

@Test
@Test (groups = "group1")
void crudSaml20() {

String name = "java-sdk-it-" + UUID.randomUUID().toString()
Expand Down Expand Up @@ -244,7 +244,7 @@ class ApplicationsIT extends ITSupport {
.setValues(["Value"])])))))
}

@Test
@Test (groups = "group1")
void crudSecurePasswordStore() {
doCrudTest(client.instantiate(SecurePasswordStoreApplication)
.setSettings(client.instantiate(SecurePasswordStoreApplicationSettings)
Expand All @@ -260,7 +260,7 @@ class ApplicationsIT extends ITSupport {
.setOptionalField3Value("finalvalue"))))
}

@Test
@Test (groups = "group1")
void crudBrowserPlugin() {
doCrudTest(client.instantiate(SwaApplication)
.setLabel(uniqueTestName)
Expand All @@ -273,7 +273,7 @@ class ApplicationsIT extends ITSupport {
// .setLoginUrlRegex("REGEX_EXPRESSION"))
}

@Test
@Test (groups = "group1")
void crudBasicAuth() {
doCrudTest(client.instantiate(BasicAuthApplication)
.setSettings(client.instantiate(BasicApplicationSettings)
Expand All @@ -282,7 +282,7 @@ class ApplicationsIT extends ITSupport {
.setUrl("https://example.com/login.html"))))
}

@Test
@Test (groups = "group1")
void crudBasicAuth_editUsernameAndPassword() {
doCrudTest(client.instantiate(BasicAuthApplication)
.setCredentials(client.instantiate(SchemeApplicationCredentials)
Expand All @@ -293,7 +293,7 @@ class ApplicationsIT extends ITSupport {
.setUrl("https://example.com/login.html"))))
}

@Test
@Test (groups = "group1")
void crudBasicAuth_adminSetsCredentials() {
doCrudTest(client.instantiate(BasicAuthApplication)
.setCredentials(client.instantiate(SchemeApplicationCredentials)
Expand All @@ -305,7 +305,7 @@ class ApplicationsIT extends ITSupport {
.setUrl("https://example.com/login.html"))))
}

@Test
@Test (groups = "group1")
void invalidApplicationCredentialsSchemeTest() {
expect(IllegalArgumentException, {
client.instantiate(BasicAuthApplication)
Expand All @@ -319,7 +319,7 @@ class ApplicationsIT extends ITSupport {
})
}

@Test
@Test (groups = "group1")
void invalidOAuthEndpointAuthenticationMethodTest() {
expect(IllegalArgumentException ,{client.instantiate(OpenIdConnectApplication)
.setSettings(client.instantiate(OpenIdConnectApplicationSettings)
Expand All @@ -343,7 +343,7 @@ class ApplicationsIT extends ITSupport {
.setTokenEndpointAuthMethod(OAuthEndpointAuthenticationMethod.SDK_UNKNOWN)))})
}

@Test
@Test (groups = "group1")
void invalidOAuthResponseTypeTest() {
expect(IllegalArgumentException ,{client.instantiate(OpenIdConnectApplication)
.setSettings(client.instantiate(OpenIdConnectApplicationSettings)
Expand All @@ -368,7 +368,7 @@ class ApplicationsIT extends ITSupport {
.setTokenEndpointAuthMethod(OAuthEndpointAuthenticationMethod.CLIENT_SECRET_POST)))})
}

@Test
@Test (groups = "group1")
void invalidOAuthGrantTypeTest() {
expect(IllegalArgumentException, {client.instantiate(OpenIdConnectApplication)
.setSettings(client.instantiate(OpenIdConnectApplicationSettings)
Expand All @@ -394,7 +394,7 @@ class ApplicationsIT extends ITSupport {
})
}

@Test
@Test (groups = "group1")
void invalidOpenIdConnectApplicationTypeTest() {
expect(IllegalArgumentException ,{
client.instantiate(OpenIdConnectApplication)
Expand All @@ -420,7 +420,7 @@ class ApplicationsIT extends ITSupport {
})
}

@Test
@Test (groups = "group1")
void crudBookmark() {
doCrudTest(client.instantiate(BookmarkApplication)
.setSettings(client.instantiate(BookmarkApplicationSettings)
Expand Down Expand Up @@ -479,7 +479,7 @@ class ApplicationsIT extends ITSupport {
assertThat(app2Keys.size(), equalTo(2))
}

@Test
@Test (groups = "group1")
void deactivateActivateTest() {
Application app = client.createApplication(client.instantiate(AutoLoginApplication)
.setLabel("app-${uniqueTestName}")
Expand All @@ -504,7 +504,8 @@ class ApplicationsIT extends ITSupport {
assertThat(client.getApplication(app.getId()).getStatus(), equalTo(Application.StatusEnum.ACTIVE))
}

@Test
// Quarantining this till OKTA-421154 is fixed
@Test (groups = "bacon")
void groupAssignmentWithNullBodyTest() {

Application app = client.createApplication(client.instantiate(AutoLoginApplication)
Expand All @@ -531,7 +532,7 @@ class ApplicationsIT extends ITSupport {
assertThat(groupAssignment, notNullValue())
}

@Test
@Test (groups = "group1")
void groupAssignmentTest() {

Application app = client.createApplication(client.instantiate(AutoLoginApplication)
Expand Down Expand Up @@ -645,7 +646,7 @@ class ApplicationsIT extends ITSupport {
assertThat readAppUser.getCredentials().getUserName(), equalTo("updated-"+user2.getProfile().getEmail())
}

@Test
@Test (groups = "group1")
void csrTest() {
Client client = getClient()

Expand Down Expand Up @@ -701,7 +702,8 @@ class ApplicationsIT extends ITSupport {
assertNotPresent(app.listCsrs(), csr)
}

@Test
// Quarantining this till OKTA-421154 is fixed
@Test (groups = "bacon")
void oAuth2ScopeConsentGrantTest() {
Client client = getClient()

Expand Down Expand Up @@ -747,7 +749,8 @@ class ApplicationsIT extends ITSupport {
assertNotPresent(app.listScopeConsentGrants(), app.getScopeConsentGrant(oAuth2ScopeConsentGrant.getId()))
}

@Test
// Quarantining this till OKTA-421154 is fixed
@Test (groups = "bacon")
void testExecuteWithoutAcceptHeader() {
def app = client.instantiate(SamlApplication)
.setVisibility(client.instantiate(ApplicationVisibility))
Expand Down Expand Up @@ -777,7 +780,7 @@ class ApplicationsIT extends ITSupport {
assertThat(response.size(), is(3))
}

@Test
@Test (groups = "group1")
void testExecuteAcceptIonPlusJson() {
def app = client.instantiate(SamlApplication)
.setVisibility(client.instantiate(ApplicationVisibility))
Expand All @@ -804,7 +807,7 @@ class ApplicationsIT extends ITSupport {
assertThat(response.size(), is(3))
}

@Test
@Test (groups = "group1")
void testGetRawResponse() {
def app = client.instantiate(SamlApplication)
.setVisibility(client.instantiate(ApplicationVisibility))
Expand Down Expand Up @@ -838,7 +841,7 @@ class ApplicationsIT extends ITSupport {
assertThat(x509Certificate.isBlank(), is(false))
}

@Test
@Test (groups = "group1")
void getApplicationUserSchemaTest() {

Application createdApp = client.instantiate(AutoLoginApplication)
Expand Down Expand Up @@ -869,7 +872,7 @@ class ApplicationsIT extends ITSupport {
})
}

@Test
@Test (groups = "group1")
void updateApplicationUserProfileTest() {

Application createdApp = client.instantiate(AutoLoginApplication)
Expand Down
Loading

0 comments on commit 3135793

Please sign in to comment.