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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- if: ${{ matrix.run-coveralls }}
name: Coveralls
uses: coverallsapp/github-action@v2
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
# *base-path* is prepended to all paths in order to correctly reference source files on coveralls.io
base-path: src/main/java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public void validate(
String ownerKey)
throws TusException, IOException {

if (uploadStorageService == null) {
return;
}

String requestUri = request.getRequestURI();
boolean isCreationEndpoint = Utils.isCreationEndpoint(request, uploadStorageService);
UploadInfo uploadInfo = uploadStorageService.getUploadInfo(requestUri, ownerKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public void testValidateUploadInfoNull() throws Exception {
validator.validate(HttpMethod.PATCH, request, storageService, "owner");
}

@Test
public void testValidateStorageServiceNull() throws Exception {
// Should return immediately without exception
validator.validate(HttpMethod.PATCH, request, null, "owner");
}

@Test(expected = TusException.class)
public void testValidateMismatchingUploadLength() throws Exception {
request.setRequestURI("/files/exists");
Expand Down
Loading