Add new file tests to OdkWebserverServiceTest#270
Open
permission-error wants to merge 6 commits intoodk-x:developmentfrom
Open
Add new file tests to OdkWebserverServiceTest#270permission-error wants to merge 6 commits intoodk-x:developmentfrom
permission-error wants to merge 6 commits intoodk-x:developmentfrom
Conversation
wbrunette
requested changes
Jan 15, 2024
| @Test | ||
| public void testServingLargeFile() { | ||
| // Setup | ||
| File directoryLocation = createTestDirectory(); |
Member
|
Instead of using "File" class use the URI style |
Member
|
@permission-error let's chat about this PR during your meeting |
Member
|
While your refactor of code improves the code, you still need to switch to the URI format in your private helper functions because when we remove the use legacy flag we are likely to see issues. Once file is created using URI interface it is fine to covert to file in your code. |
wbrunette
requested changes
Feb 4, 2024
...s_app/src/androidTest/java/org/opendatakit/webkitserver/service/OdkWebserverServiceTest.java
Outdated
Show resolved
Hide resolved
wbrunette
requested changes
Feb 8, 2024
...s_app/src/androidTest/java/org/opendatakit/webkitserver/service/OdkWebserverServiceTest.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description:
This pull request introduces several changes to the
OdkWebserverServiceTestclass in theorg.opendatakit.webkitserver.servicepackage. Here's a summary of the changes:1. Added Permission Rules:
WRITE_EXTERNAL_STORAGEandREAD_EXTERNAL_STORAGEpermissions to the test class.2. Updated Test Methods:
Updated test methods to create and serve various types of files and handle different scenarios, including serving HTML files, empty files, large files, files with special characters in their names, files with spaces in their names, files with Unicode characters in their content, files with invalid extensions, files with uppercase extensions, binary files, files with multiple dots in their names, files with no extension, and files with different extensions.
Added assertions to verify the responses from the web server for each test scenario.
3. Refactored Code:
4. Miscellaneous Changes:
Tags @wbrunette @Lamouresparus