Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary leading slash when deleting container #1806

Merged
merged 2 commits into from
Jan 23, 2024
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
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