Skip to content

Commit

Permalink
Remove unnecessary leading slash when deleting container (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-tchad authored Jan 23, 2024
1 parent f41c894 commit 64a7dd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@Category({Daily.class})
public class GetReadableContainersAPITest extends BaseWebDriverTest
{
private static final String PROJECT_PREFIX = "GetReadableContainersAPITest";
private static final String PROJECT_PREFIX = "/GetReadableContainersAPITest";
private static final String READABLE_PROJECT = PROJECT_PREFIX + " Readable";
private static final String UNREADABLE_PROJECT = PROJECT_PREFIX + " Unreadable";
private static final String USER = "reader@containersapi.test";
Expand Down Expand Up @@ -190,7 +190,7 @@ private String getPathToFolder(boolean projectReadable, boolean... foldersReadab
private Set<String> getReadableContainers(Boolean includeSubfolders, Integer depth, Object container)
{
List<String> response = executeGetReadableContainers(includeSubfolders, depth, container, List.class);
return response.stream().filter(path -> path.startsWith("/" + PROJECT_PREFIX)).collect(Collectors.toSet());
return response.stream().filter(path -> path.startsWith(PROJECT_PREFIX)).collect(Collectors.toSet());
}

private List<Map<String, String>> getReadableContainersErrors(Boolean includeSubfolders, Integer depth, Object container)
Expand All @@ -214,7 +214,7 @@ private <T> T executeGetReadableContainers(Boolean includeSubfolders, Integer de
if (depth != null)
config.put("depth", depth);
if (container != null)
config.put("container", "/" + container);
config.put("container", container);

String script = "var config = arguments[0];\n" +
"config.success = callback;\n" +
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/util/APIContainerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ else if (parentPath.equals("/"))
@Override
protected void doDeleteProject(String projectName, boolean failIfNotFound, int wait) throws TestTimeoutException
{
deleteContainer("/" + projectName, failIfNotFound, wait);
deleteContainer(projectName, failIfNotFound, wait);
}

@Override
Expand Down

0 comments on commit 64a7dd0

Please sign in to comment.