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

Add deletion check to test #73

Closed
wants to merge 1 commit into from
Closed

Add deletion check to test #73

wants to merge 1 commit into from

Conversation

frauzufall
Copy link
Member

The current test for uploading is pretending things are working when they are not.

The current webdav uploader has a reflection hack overriding the default GET method of a HTTP request by special ones like DELETE or OPTIONS. For HTTPS, this hack does not work. Therefore, when assuming the DELETE method is called, the GET method is called instead. In case the file is present, it returns 200 - all good. The test is assuming deleting worked and continues..

This PR adds a test if deleted files really don't exist anymore afterwards. It also adds a boolean isDeleted(String path) function to Deleter interface. Other Uploaders must implement this method, otherwise NotImplementedException is thrown when running this test. The Exception is the reason why I added the commons-lang dependency..

Not happy with the naming of isUpdateSiteEmpty() either since the test is only checking if the db.xml.gz is present.. But since it's a public method I was not sure about renaming it.

frauzufall added a commit to imagej/imagej-plugins-uploader-webdav that referenced this pull request Feb 8, 2019
* depends on imagej/imagej-updater#73
* by checking if a file is actually deleted,
AbstractUploaderTestBase.test() will now fail for HTTPS (because
uploading does not work there yet)
* removes unused import
frauzufall added a commit to juglab/imagej-plugins-uploader-webdav that referenced this pull request Feb 11, 2019
* adds test if deleted files really don't exist anymore afterwards
* adds boolean isDeleted(String path) function to Deleter interface
* other Uploaders must implement this method, otherwise
NotImplementedException is thrown when running this test
@frauzufall
Copy link
Member Author

This happened here: 41bc3f9

@frauzufall frauzufall closed this Aug 19, 2019
@frauzufall frauzufall deleted the fix-upload-test branch August 19, 2019 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant