Skip to content

Commit

Permalink
fixed e2e tests failures
Browse files Browse the repository at this point in the history
  • Loading branch information
holashchand committed Jan 18, 2024
1 parent 8303bac commit 013fe62
Show file tree
Hide file tree
Showing 7 changed files with 573 additions and 1,388 deletions.
2 changes: 1 addition & 1 deletion imports/realm-export.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
"serviceAccountClientId": "admin-api",
"disableableCredentialTypes": [],
"requiredActions": [],
"realmRoles": ["default-roles-sunbird-rc"],
"realmRoles": ["default-roles-sunbird-rc", "admin"],
"clientRoles": {
"realm-management": ["manage-users", "manage-realm"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"personal_details": {
"email": "test@rc.com"
"email": "test2@rc.com"
},
"identity_details": {
"id": "id",
Expand Down
6 changes: 3 additions & 3 deletions java/apitest/src/test/java/e2e/registry/registry.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Registry api tests
* string notificationsUrl = "http://localhost:8765"
* url registryUrl
* def admin_token = ""
* def client_secret = 'a52c5f4a-89fd-40b9-aea2-3f711f14c889'
* def client_secret = '**********'
* def sleep = function(millis){ java.lang.Thread.sleep(millis) }
@envnot=fusionauth
Scenario: health check
Expand Down Expand Up @@ -243,7 +243,7 @@ Feature: Registry api tests
* header Host = 'keycloak:8080'
* form field grant_type = 'client_credentials'
* form field client_id = 'admin-api'
* form field client_secret = 'a52c5f4a-89fd-40b9-aea2-3f711f14c889'
* form field client_secret = client_secret
* method post
* def sample = read('inviteFlow.json')
Then status 200
Expand Down Expand Up @@ -699,7 +699,7 @@ Feature: Registry api tests
And request read('TeacherUniqueRequest.json')
When method post
Then status 500
* match response.params.errmsg contains "java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"public_V_personal_details_email_sqlgIdx\"\n Detail: Key (email)=(test@rc.com) already exists."
* match response.params.errmsg contains "java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"public_V_personal_details_email_sqlgIdx\"\n Detail: Key (email)=(test2@rc.com) already exists."
# create entity with different email, violates composite unique index
Given url registryUrl
And path 'api/v1/TeacherUnique/invite'
Expand Down
Loading

0 comments on commit 013fe62

Please sign in to comment.