Search in sources :

Example 11 with DataGridTicket

use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.

the class TestCreateTicketWithUsesLimit 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.setUsesLimit(USES_LIMIT);
}
Also used : DataGridTicket(com.emc.metalnx.core.domain.entity.DataGridTicket) Before(org.junit.Before)

Example 12 with DataGridTicket

use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.

the class TestCreateTicketWithHostRestriction 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.addHost(host);
}
Also used : DataGridTicket(com.emc.metalnx.core.domain.entity.DataGridTicket) Before(org.junit.Before)

Example 13 with DataGridTicket

use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.

the class TestCreateDuplicatedTicket method testCreateDuplicatedTicket.

@Test(expected = DataGridTicketException.class)
public void testCreateDuplicatedTicket() throws DataGridConnectionRefusedException, DataGridTicketException {
    DataGridTicket dgt = new DataGridTicket(targetPath);
    dgt.setTicketString(ticketString);
    ticketService.create(dgt);
}
Also used : DataGridTicket(com.emc.metalnx.core.domain.entity.DataGridTicket) Test(org.junit.Test)

Example 14 with DataGridTicket

use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.

the class TestCreateTicketWithByteLimit 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.setWriteByteLimit(WRITE_BYTE_LIMIT);
}
Also used : DataGridTicket(com.emc.metalnx.core.domain.entity.DataGridTicket) Before(org.junit.Before)

Example 15 with DataGridTicket

use of com.emc.metalnx.core.domain.entity.DataGridTicket in project metalnx-web by irods-contrib.

the class TestCreateTicketWithFilesLimit 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.setWriteFileLimit(WRITE_FILE_LIMIT);
}
Also used : DataGridTicket(com.emc.metalnx.core.domain.entity.DataGridTicket) Before(org.junit.Before)

Aggregations

DataGridTicket (com.emc.metalnx.core.domain.entity.DataGridTicket)25 Test (org.junit.Test)10 Before (org.junit.Before)7 Ticket (org.irods.jargon.ticket.Ticket)4 UnsupportedDataGridFeatureException (com.emc.metalnx.core.domain.exceptions.UnsupportedDataGridFeatureException)3 JargonException (org.irods.jargon.core.exception.JargonException)3 TicketAdminService (org.irods.jargon.ticket.TicketAdminService)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 Date (java.util.Date)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2 DataGridTicketException (com.emc.metalnx.core.domain.exceptions.DataGridTicketException)1 DataGridTicketNotFoundException (com.emc.metalnx.core.domain.exceptions.DataGridTicketNotFoundException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 DataNotFoundException (org.irods.jargon.core.exception.DataNotFoundException)1 TicketCreateModeEnum (org.irods.jargon.ticket.packinstr.TicketCreateModeEnum)1 ResponseEntity (org.springframework.http.ResponseEntity)1