Skip to content

Commit

Permalink
#61 release testing/prep activities
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Jan 24, 2022
1 parent 4f4d372 commit 246b9cf
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 112 deletions.
23 changes: 9 additions & 14 deletions docker-test-framework/4-1/Dockerfile.consumer
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
#
# iRODS Provider Image.
#
FROM ubuntu:14.04
#
# iRODS Provider Image.
#
FROM ubuntu:16.04

# TODO: Remove this line when apt gets its stuff together
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1nl.\2/" /etc/apt/sources.list

# Install pre-requisites
RUN apt-get update && \
apt-get install -y sudo \
wget \
lsb-release \
apt-transport-https \
python-pip \
libfuse2 \
netcat \
super \
python-jsonschema \
lsof \
python-psutil \
curl \
libjson-perl && \
apt-get install -y sudo wget lsb-release apt-transport-https postgresql vim python-pip libfuse2 unixodbc rsyslog less && \
pip install xmlrunner


# Grab .debs and install
RUN wget https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-runtime-4.1.12-ubuntu14-x86_64.deb && \
dpkg -i irods-runtime-4.1.12-ubuntu14-x86_64.deb && \
Expand Down
28 changes: 9 additions & 19 deletions docker-test-framework/4-1/Dockerfile.provider
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
#
# iRODS Provider Image.
#
FROM ubuntu:14.04
FROM ubuntu:16.04

# TODO: Remove this line when apt gets its stuff together
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1nl.\2/" /etc/apt/sources.list

# Install pre-requisites
RUN apt-get update && \
apt-get install -y sudo \
wget \
lsb-release \
apt-transport-https \
postgresql \
python-pip \
libfuse2 \
unixodbc \
netcat \
super \
odbc-postgresql \
python-jsonschema \
lsof \
python-psutil \
libjson-perl && \
apt-get install -y sudo wget lsb-release apt-transport-https postgresql vim python-pip libfuse2 unixodbc rsyslog less nano libjson-perl python-psutil python-requests lsof python-jsonschema odbc-postgresql super && \
pip install xmlrunner


# Grab .debs
RUN wget https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-runtime-4.1.12-ubuntu14-x86_64.deb && \
wget https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-icat-4.1.12-ubuntu14-x86_64.deb && \
wget https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-database-plugin-postgres-1.12-ubuntu14-x86_64.deb
RUN wget --no-check-certificate https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-runtime-4.1.12-ubuntu14-x86_64.deb && \
wget --no-check-certificate https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-icat-4.1.12-ubuntu14-x86_64.deb && \
wget --no-check-certificate https://files.renci.org/pub/irods/releases/4.1.12/ubuntu14/irods-database-plugin-postgres-1.12-ubuntu14-x86_64.deb

RUN dpkg -i irods-runtime-4.1.12-ubuntu14-x86_64.deb
RUN dpkg -i irods-icat-4.1.12-ubuntu14-x86_64.deb
Expand Down
2 changes: 1 addition & 1 deletion docker-test-framework/4-2/for-etc-irods/server_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"plugin_name": "irods_rule_engine_plugin-irods_rule_language",
"plugin_specific_configuration": {
"re_data_variable_mapping_set": [
"core","jargon_extras"
"core"
],
"re_function_name_mapping_set": [
"core"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,20 +338,8 @@ public SessionClosingIRODSFileOutputStream instanceSessionClosingIRODSFileOutput
throw new IllegalArgumentException("null irodsFile");
}

FileIOOperations fileIOOperations = new FileIOOperationsAOImpl(getIRODSSession(), getIRODSAccount());
try {
if (!file.exists()) {
log.info("file does not exist, creating a new file");
file.createNewFileCheckNoResourceFound(OpenFlags.READ_WRITE);
}

/*
* else if (!file.canWrite()) {
* log.info("this file is not writeable by the current user {}",
* file.getAbsolutePath()); throw new JargonException("file is not writeable:" +
* file.getAbsolutePath()); }
*/

FileIOOperations fileIOOperations = new FileIOOperationsAOImpl(getIRODSSession(), getIRODSAccount());
return new SessionClosingIRODSFileOutputStream(file, fileIOOperations);
} catch (FileNotFoundException e) {
log.error("FileNotFound creating output stream", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import org.irods.jargon.core.checksum.ChecksumValue;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.packinstr.DataObjInp.OpenFlags;
import org.irods.jargon.core.pub.DataTransferOperations;
import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
import org.irods.jargon.core.pub.IRODSFileSystem;
Expand Down Expand Up @@ -81,36 +80,6 @@ public final void testCreateAndCloseNoDefResc() throws Exception {

}

@Test
public final void testCoordinatedTwoFilesOpenAndClose() throws Exception {
// generate a local scratch file
String testFileName = "testCreateAndCloseNoDefResc.txt";
String targetIrodsCollection = testingPropertiesHelper
.buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH);

IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);
irodsAccount.setDefaultStorageResource("");

IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();

IRODSFileFactory irodsFileFactory = accessObjectFactory.getIRODSFileFactory(irodsAccount);
IRODSFile myFile = irodsFileFactory.instanceIRODSFile(targetIrodsCollection + "/" + testFileName);

IRODSRandomAccessFile irodsRandomAccessFile = irodsFileFactory.instanceIRODSRandomAccessFile(myFile,
OpenFlags.READ_WRITE_CREATE_IF_NOT_EXISTS, true);

IRODSFile myFile2 = irodsFileFactory.instanceIRODSFile(targetIrodsCollection + "/" + testFileName);

IRODSRandomAccessFile irodsRandomAccessFile2 = irodsFileFactory.instanceIRODSRandomAccessFile(myFile2,
OpenFlags.READ_WRITE_CREATE_IF_NOT_EXISTS, true);

irodsRandomAccessFile.close();
irodsRandomAccessFile2.close();

irodsFileSystem.closeAndEatExceptions();

}

@Test
public final void testRead() throws Exception {
// generate a local scratch file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ public String putStringValueIntoCache(final String stringToCache, final String k
* @throws JargonException
*/
private void createCacheFileAndCacheDir(final IRODSFile cacheFile) throws JargonException {
try {
cacheFile.getParentFile().mkdirs();
cacheFile.createNewFile();
} catch (IOException e) {
throw new JargonException("error creating new cache file");
}
// try {
cacheFile.getParentFile().mkdirs();
// cacheFile.createNewFile();
// } catch (IOException e) {
// throw new JargonException("error creating new cache file");
// }
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public String putStringValueIntoCache(final String stringToCache, final String k
* @throws JargonException
*/
private void createCacheFileAndCacheDir(final IRODSFile cacheFile) throws JargonException {
try {
cacheFile.getParentFile().mkdirs();
cacheFile.createNewFile();
} catch (IOException e) {
throw new JargonException("error creating new cache file");
}
// try {
cacheFile.getParentFile().mkdirs();
// cacheFile.createNewFile();
// } catch (IOException e) {
// throw new JargonException("error creating new cache file");
// }
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ public final class TicketAdminServiceImpl extends AbstractTicketService implemen
* Default constructor takes the objects necessary to communicate with iRODS via
* Access Objects
*
* @param irodsAccessObjectFactory
* {@link IRODSAccessObjectFactory} that can create various access
* objects
* @param irodsAccount
* {@link IRODSAccount} with login information for the target grid
* @param irodsAccessObjectFactory {@link IRODSAccessObjectFactory} that can
* create various access objects
* @param irodsAccount {@link IRODSAccount} with login information
* for the target grid
* @throws JargonException
*/
TicketAdminServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, final IRODSAccount irodsAccount)
Expand Down Expand Up @@ -217,7 +216,6 @@ public String createTicket(final TicketCreateModeEnum mode, final IRODSFile file
}

TicketAdminInp ticketPI = TicketAdminInp.instanceForCreate(mode, file.getAbsolutePath(), myTicketId);
log.info(EXECUTING_TICKET_PI);

ProtocolExtensionPoint pep = irodsAccessObjectFactory.getProtocolExtensionPoint(irodsAccount);
Tag ticketOperationResponse = pep.irodsFunction(ticketPI);
Expand Down Expand Up @@ -1118,15 +1116,13 @@ public boolean deleteAllTicketsForThisUser() throws JargonException {
* Given a result row from a ticket query, put the values into the provided
* {@code Ticket} common to tickets for collections and data objects
*
* @param ticket
* {@link Ticket} object that will be initialized with values from
* the query result row. The provided {@code Ticket} in the method
* parameter will be updated by this method.
* @param row
* {@link IRODSQueryResultRow} from a query for the ticket as
* specified by the methods internal to this object. This is not a
* generally applicable method,, rather it assumes the columns have
* been requested in a certain order.
* @param ticket {@link Ticket} object that will be initialized with values from
* the query result row. The provided {@code Ticket} in the method
* parameter will be updated by this method.
* @param row {@link IRODSQueryResultRow} from a query for the ticket as
* specified by the methods internal to this object. This is not a
* generally applicable method,, rather it assumes the columns
* have been requested in a certain order.
* @throws JargonException
*/
private void putResultDataIntoTicketCommonValues(final Ticket ticket, final IRODSQueryResultRow row)
Expand Down Expand Up @@ -1164,8 +1160,7 @@ private String buildQuerySelectForLSAllTicketsForCollections() {
/**
* Add the collection specific elements to a query
*
* @param builder
* {@link IRODSGenQueryBuilder}
* @param builder {@link IRODSGenQueryBuilder}
* @throws GenQueryBuilderException
*/
private void addQuerySelectsForListAllTicketsForCollections(final IRODSGenQueryBuilder builder)
Expand Down Expand Up @@ -1220,8 +1215,7 @@ private String buildQuerySelectForLSAllTicketsForDataObjects() {
/**
* Add the data object specific elements to a query
*
* @param builder
* {@link IRODSGenQueryBuilder}
* @param builder {@link IRODSGenQueryBuilder}
* @throws GenQueryBuilderException
*/
private void addQuerySelectsForListAllTicketsForDataObjects(final IRODSGenQueryBuilder builder)
Expand Down Expand Up @@ -1273,8 +1267,7 @@ private String buildQuerySelectForTicketsCommon() {
* Add selects (which will be in the established order of the passed in builder)
* which are the basics for tickets to use in a gen query
*
* @param builder
* {@link RIODSGenQueryBuilder} to which the fields will be added
* @param builder {@link RIODSGenQueryBuilder} to which the fields will be added
*/
private void addSelectsForTicketsCommonToQueryBuilder(final IRODSGenQueryBuilder builder)
throws GenQueryBuilderException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ public Tag getTagValue() throws JargonException {

return message;
}
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

}
Original file line number Diff line number Diff line change
Expand Up @@ -2836,7 +2836,7 @@ public void createTicketFromTicketObjectForDataObject() throws Exception {
TicketAdminService ticketSvc = new TicketAdminServiceImpl(accessObjectFactory, irodsAccount);

Ticket ticket = new Ticket();
ticket.setTicketString(testFileName);
ticket.setTicketString("createTicketFromTicketObjectF");
ticket.setIrodsAbsolutePath(targetFile.getAbsolutePath());
ticket.setType(TicketCreateModeEnum.READ);
Ticket returnedTicket = ticketSvc.createTicketFromTicketObject(ticket);
Expand Down

0 comments on commit 246b9cf

Please sign in to comment.