diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java index 2908d50d55e82624118162b45cd9783256c779b4..4f90bcad91d2290a4993053af090c6f103b0ae78 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/DatasetDownloadServletTest.java @@ -239,14 +239,15 @@ public class DatasetDownloadServletTest + "<body><table> " + OSUtilities.LINE_SEPARATOR + "<tr><td class='td_file'>" - + "<a href='/datastore_server/1234-1/" + ESCAPED_EXAMPLE_DATA_SET_SUB_FOLDER_NAME + "?mode=simpleHtml&sessionID=AV76CF'>" - + "+ s % ! # @</td><td></td><td></td></tr>" + + "<a href='/datastore_server/1234-1/" + ESCAPED_EXAMPLE_DATA_SET_SUB_FOLDER_NAME + "?disableLinks=false&mode=simpleHtml&sessionID=AV76CF'>" + + "+ s % ! # @</td><td>68 bytes</td><td></td></tr>" + OSUtilities.LINE_SEPARATOR + "<tr><td class='td_file'>" - + "<a href='/datastore_server/1234-1/" + ESCAPED_FILE_NAME_ENCODED + "?mode=simpleHtml&sessionID=AV76CF'>" + + "<a href='/datastore_server/1234-1/" + ESCAPED_FILE_NAME_ENCODED + "?disableLinks=false&mode=simpleHtml&sessionID=AV76CF'>" + "read me @home.txt</td><td>12 bytes</td><td></td></tr>" + OSUtilities.LINE_SEPARATOR + "</table> </div> </body></html>" - + OSUtilities.LINE_SEPARATOR + "", writer.toString()); + + OSUtilities.LINE_SEPARATOR + "", + writer.toString()); String normalizedLogContent = getNormalizedLogContent(); assertContains(getSessionCreationLogMessage() + OSUtilities.LINE_SEPARATOR + LOG_INFO @@ -277,6 +278,9 @@ public class DatasetDownloadServletTest one(request).getParameter(DatasetDownloadServlet.MAIN_DATA_SET_PATTERN_KEY); will(returnValue(null)); + + one(request).getParameter(DatasetDownloadServlet.DISABLE_LINKS); + will(returnValue(null)); } }); } @@ -394,10 +398,11 @@ public class DatasetDownloadServletTest assertEquals( "<html><head><style type='text/css'> * { margin: 3px; }html { height: 100%; }body { height: 100%; font-family: verdana, tahoma, helvetica; font-size: 11px; text-align:left; }h1 { text-align: center; padding: 1em; color: #1E4E8F;}.td_hd { border: 1px solid #FFFFFF; padding 3px; background-color: #DDDDDD; height: 1.5em; }.div_hd { background-color: #1E4E8F; color: white; font-weight: bold; padding: 3px; }table { border-collapse: collapse; padding: 1em; }tr, td { font-family: verdana, tahoma, helvetica; font-size: 11px; }.td_file { font-family: verdana, tahoma, helvetica; font-size: 11px; height: 1.5em }.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0em auto -4em; }.footer { height: 4em; text-align: center; }</style></head><body><table> <tr><td class='td_hd'>Folder:</td><td>+ s % ! # @</td></tr>" + OSUtilities.LINE_SEPARATOR - + "<tr><td class='td_file'><a href='/datastore_server/1234-1/?mode=simpleHtml&sessionID=AV76CF'>..</td><td></td><td></td></tr>" + + "<tr><td class='td_file'><a href='/datastore_server/1234-1/?disableLinks=false&mode=simpleHtml&sessionID=AV76CF'>..</td><td></td><td></td></tr>" + OSUtilities.LINE_SEPARATOR + "</table> </div> </body></html>" - + OSUtilities.LINE_SEPARATOR, writer.toString()); + + OSUtilities.LINE_SEPARATOR, + writer.toString()); assertContains(LOG_INFO + "For data set '1234-1' show directory '" + EXAMPLE_DATA_SET_SUB_FOLDER_NAME + "'", getNormalizedLogContent()); @@ -603,7 +608,8 @@ public class DatasetDownloadServletTest LOG_ERROR + "Could not create a servlet session since no existing servlet session is available, " + "and the openBIS session ID was not provided as a parameter: [mode=html] " - + "Session Timeout: 120 sec", getNormalizedLogContent()); + + "Session Timeout: 120 sec", + getNormalizedLogContent()); context.assertIsSatisfied(); } @@ -693,6 +699,8 @@ public class DatasetDownloadServletTest exp.will(Expectations.returnValue(null)); exp.one(request).getParameter(DatasetDownloadServlet.MAIN_DATA_SET_PATTERN_KEY); exp.will(Expectations.returnValue(null)); + exp.one(request).getParameter(DatasetDownloadServlet.DISABLE_LINKS); + exp.will(Expectations.returnValue(null)); // For the logging of problem requests Vector<String> parameterNames = new Vector<String>(); @@ -723,6 +731,9 @@ public class DatasetDownloadServletTest one(request).getParameter(DatasetDownloadServlet.MAIN_DATA_SET_PATTERN_KEY); will(returnValue(null)); + + one(request).getParameter(DatasetDownloadServlet.DISABLE_LINKS); + will(returnValue(null)); } }); }