Skip to content

Commit

Permalink
Internal/fix failing Clarin integration test (#796)
Browse files Browse the repository at this point in the history
* Initial commit

* Ignore the test class from where the tests has started failing.

* Ignored half of tests in the ClarinShibbolethLoginFilterIT file

* Ignored all tests

* unignore some tests

* 3 tests ignored 3 allowed

* Maybe the problematic test is hidden between 3 unignored tests

* two candidates

* The last candidate

* Ignore just wrong test and all test should pass

* Clean up object created in the test.

* Removed unused import.

* Check the user which is going to be deleted is not null.
  • Loading branch information
milanmajchrak authored Oct 31, 2024
1 parent 8d115da commit 659d14e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ public void testShouldReturnDuplicateUserErrorLoginWithoutNetId() throws Excepti
.andExpect(redirectedUrl("http://localhost:4000/login/duplicate-user?email=" + email))
.andReturn().getResponse().getHeader("Authorization");

// Check if was created a user with such email and netid.
EPerson ePerson = checkUserWasCreated(netId, IDP_TEST_EPERSON, email, null);
deleteShibbolethUser(ePerson);
}

// This test is copied from the `ShibbolethLoginFilterIT` and modified following the Clarin updates.
Expand Down Expand Up @@ -567,6 +570,7 @@ public void testSuccessFullLoginWithTwoEmails() throws Exception {
checkUserIsSignedIn(token);
// Find the user by the second email
EPerson ePerson = checkUserWasCreated(null, IDP_TEST_EPERSON, secondEmail, null);
assertTrue(Objects.nonNull(ePerson));
deleteShibbolethUser(ePerson);
}

Expand Down

0 comments on commit 659d14e

Please sign in to comment.