Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/branch_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
tags:
- '*'

permissions:
pull-requests: write
contents: write

jobs:
branch_release:
if: github.event.created && github.event.sender.login == 'labkey-teamcity'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/merge_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
types:
- submitted

permissions:
pull-requests: write
contents: write

jobs:
merge_release:
if: >
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- reopened
- ready_for_review

permissions:
pull-requests: read

jobs:
validate_pr:
if: github.event.pull_request.head.repo.owner.login == 'LabKey'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ function doTest()

if (contextPath.length > 0) {
var baseUrl = LABKEY.ActionURL.getBaseURL();
if (baseUrl.indexOf("labkey/") != baseUrl.length - 7)
if (!baseUrl.endsWith(contextPath + "/"))
errors[errors.length] = new Error("ActionURL.getBaseURL() = " + baseUrl);
}

var queryString = LABKEY.ActionURL.queryString(urlParameters);
if( queryString != 'x=fred&y=barney' )
if( queryString !== 'x=fred&y=barney' )
errors[errors.length] = new Error("ActionURL.queryString = " + queryString);

var url = LABKEY.ActionURL.buildURL(controller, action, containerPath, urlParameters);
if( url != contextPath + "/" + controller + "/" + containerPath + "/" + action + ".view?" + queryString &&
url != contextPath + "/" + containerPath + "/" + controller + "-" + action + ".view?" + queryString)
if( url !== contextPath + "/" + controller + "/" + containerPath + "/" + action + ".view?" + queryString &&
url !== contextPath + "/" + containerPath + "/" + controller + "-" + action + ".view?" + queryString)
errors[errors.length] = new Error("ActionURL.buildUrl() = " + url);

var parameters = LABKEY.ActionURL.getParameters(url);
if( Ext.util.JSON.encode(parameters) != Ext.util.JSON.encode(urlParameters) )
if( Ext.util.JSON.encode(parameters) !== Ext.util.JSON.encode(urlParameters) )
errors[errors.length] = new Error("ActionURL.getParameters() = " + Ext.util.JSON.encode(parameters));

if( errors.length > 0 )
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/BaseWebDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Statement createFailOnTimeoutStatement(Statement statement, Class<?> testClass)
else
minutes = ClassTimeout.DEFAULT;

minutes *= timeoutMultiplier;
minutes = Math.round(minutes * timeoutMultiplier);

if (minutes == 0)
minutes = 1;
Expand Down
6 changes: 6 additions & 0 deletions src/org/labkey/test/TestFileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,15 @@ private static List<File> unTar(final File inputFile, final File outputDir) thro
TarArchiveInputStream inputStream = new ArchiveStreamFactory().createArchiveInputStream("tar", is))
{
TarArchiveEntry entry;
Path normalizedOutputPath = outputDir.toPath().normalize();

while ((entry = inputStream.getNextEntry()) != null)
{
final File outputFile = new File(outputDir, entry.getName());

if (!outputFile.toPath().normalize().startsWith(normalizedOutputPath))
throw new IOException("Bad zip entry (" + entry.getName() + ") in " + inputFile.getAbsolutePath());

if (entry.isDirectory())
{
if (!outputFile.exists())
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/tests/SpecimenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ private void verifyRequestingLocationCounts(StudyLocationType... types)
waitForElement(Locators.bodyTitle().withText("New Specimen Request"));
int expectedLocationCount = StudyLocationType.untypedSites();

long additionalLocations = Math.round(Math.pow(2, StudyLocationType.values().length - 1));
int additionalLocations = (int) Math.round(Math.pow(2, StudyLocationType.values().length - 1));

for (StudyLocationType type : StudyLocationType.values())
{
Expand Down