Skip to content

Commit

Permalink
[DICE-UNC#448] Adjust tests for iRODS 4.3.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed May 21, 2024
1 parent 9b48aaa commit f80c430
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.irods.jargon.core.exception.DuplicateDataException;
import org.irods.jargon.core.exception.InvalidGroupException;
import org.irods.jargon.core.exception.InvalidUserException;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.protovalues.UserTypeEnum;
import org.irods.jargon.core.pub.domain.User;
import org.irods.jargon.core.pub.domain.UserGroup;
Expand Down Expand Up @@ -765,8 +766,16 @@ public final void testRemoveUserFromGroupUserNotInGroup() throws Exception {
userGroupAO.removeUserGroup(userGroup);
userGroupAO.addUserGroup(userGroup);

userGroupAO.removeUserFromGroup(testUserGroup,
testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null);
if (accessObjectFactory.getIRODSServerProperties(irodsAccount).isAtLeastIrods432()) {
JargonException thrown = Assert.assertThrows(JargonException.class,
() -> userGroupAO.removeUserFromGroup(testUserGroup,
testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null));
Assert.assertEquals(thrown.getUnderlyingIRODSExceptionCode(), -1830000); // USER_NOT_IN_GROUP
}
else {
userGroupAO.removeUserFromGroup(testUserGroup,
testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_USER_KEY), null);
}
}

/**
Expand Down

0 comments on commit f80c430

Please sign in to comment.