use of com.emc.metalnx.services.tests.tickets.TestTicketUtils in project metalnx-web by irods-contrib.
the class TestTicketWithExpirationDate method setUp.
@Before
public void setUp() throws DataGridException, JargonException, IOException {
String parentPath = String.format("/%s/home", zone);
targetPath = String.format("%s/%s", parentPath, username);
ticketUtils = new TestTicketUtils(irodsServices);
ticketString = ticketUtils.createTicket(parentPath, username, TicketCreateModeEnum.WRITE);
ticketUtils.setExpirationDate(ticketString, yesterday());
localFile = ticketUtils.createLocalFile();
filePath = String.format("%s/%s", targetPath, localFile.getName());
}
use of com.emc.metalnx.services.tests.tickets.TestTicketUtils in project metalnx-web by irods-contrib.
the class TestTicketWithUsesLimit method setUp.
@Before
public void setUp() throws DataGridException, JargonException, IOException {
String parentPath = String.format("/%s/home", zone);
targetPath = String.format("%s/%s", parentPath, username);
ticketUtils = new TestTicketUtils(irodsServices);
ticketString = ticketUtils.createTicket(parentPath, username, TicketCreateModeEnum.WRITE);
ticketUtils.setUsesLimit(ticketString, USES_LIMIT);
localFile = ticketUtils.createLocalFile();
localFile2 = ticketUtils.createLocalFile("ticket-file-2-" + System.currentTimeMillis());
filePath1 = String.format("%s/%s", targetPath, localFile.getName());
filePath2 = String.format("%s/%s", targetPath, localFile2.getName());
}
use of com.emc.metalnx.services.tests.tickets.TestTicketUtils in project metalnx-web by irods-contrib.
the class TestTicketWithGroupRestriction method setUp.
@Before
public void setUp() throws DataGridException, JargonException, IOException {
String parentPath = String.format("/%s/home", zone);
targetPath = String.format("%s/%s", parentPath, username);
ticketUtils = new TestTicketUtils(irodsServices);
ticketString = ticketUtils.createTicket(parentPath, username, TicketCreateModeEnum.WRITE);
ticketUtils.addGroupRestriction(ticketString, PUBLIC_GROUP);
localFile = ticketUtils.createLocalFile();
filePath = String.format("%s/%s", targetPath, localFile.getName());
}
Aggregations