use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.
the class TestCreateTicketWithUserRestriction method setUp.
@Before
public void setUp() throws DataGridException, JargonException {
String parentPath = String.format("/%s/home", zone);
targetPath = String.format("%s/%s", parentPath, username);
ticketUtils = new TestTicketUtils(irodsServices);
dgt = new DataGridTicket(targetPath);
dgt.addUser(username);
}
use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.
the class TestModifyTicket method testModifyTicketWriteByteLimit.
@Test
public void testModifyTicketWriteByteLimit() throws DataGridConnectionRefusedException, DataGridTicketException {
long newWriteByteLimit = 2 * WRITE_BYTE_LIMIT;
DataGridTicket dgt = new DataGridTicket(targetPath);
dgt.setTicketString(ticketString);
dgt.setWriteByteLimit(newWriteByteLimit);
DataGridTicket ticketModified = ticketService.modify(dgt);
assertEquals(newWriteByteLimit, ticketModified.getWriteByteLimit());
assertFalse(ticketModified.getTicketString().isEmpty());
assertTrue(ticketModified.getPath().equals(targetPath));
assertTrue(ticketModified.getOwner().equals(username));
}
use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.
the class TestModifyTicket method testModifyTicketWriteFileLimit.
@Test
public void testModifyTicketWriteFileLimit() throws DataGridConnectionRefusedException, DataGridTicketException {
int newWriteFileLimit = WRITE_FILE_LIMIT + 1;
DataGridTicket dgt = new DataGridTicket(targetPath);
dgt.setTicketString(ticketString);
dgt.setWriteFileLimit(newWriteFileLimit);
DataGridTicket ticketModified = ticketService.modify(dgt);
assertEquals(newWriteFileLimit, ticketModified.getWriteFileLimit());
assertFalse(ticketModified.getTicketString().isEmpty());
assertTrue(ticketModified.getPath().equals(targetPath));
assertTrue(ticketModified.getOwner().equals(username));
}
use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.
the class TestModifyTicket method testModifyTicketUsers.
@Test
public void testModifyTicketUsers() throws DataGridConnectionRefusedException, DataGridTicketException {
DataGridTicket dgt = new DataGridTicket(targetPath);
dgt.setTicketString(ticketString);
dgt.addUser(username);
DataGridTicket ticketModified = ticketService.modify(dgt);
assertEquals(1, ticketModified.getUsers().size());
assertTrue(ticketModified.getUsers().contains(username));
assertFalse(ticketModified.getTicketString().isEmpty());
assertTrue(ticketModified.getPath().equals(targetPath));
assertTrue(ticketModified.getOwner().equals(username));
}
use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.
the class TestModifyTicket method testModifyTicketGroups.
@Test
public void testModifyTicketGroups() throws DataGridConnectionRefusedException, DataGridTicketException {
DataGridTicket dgt = new DataGridTicket(targetPath);
dgt.setTicketString(ticketString);
dgt.addGroup(PUBLIC_GROUP);
DataGridTicket ticketModified = ticketService.modify(dgt);
assertEquals(1, ticketModified.getGroups().size());
assertTrue(ticketModified.getGroups().contains(PUBLIC_GROUP));
assertFalse(ticketModified.getTicketString().isEmpty());
assertTrue(ticketModified.getPath().equals(targetPath));
assertTrue(ticketModified.getOwner().equals(username));
}
Aggregations