-
Notifications
You must be signed in to change notification settings - Fork 31
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 empty ssl file upload #518
Remove empty ssl file upload #518
Conversation
If I try to run the integration tests, the
I haven't altered this test file. Any ideas about what happened? |
This will happen if you run itests with |
src/main/java/io/cryostat/net/web/http/api/v2/CertificatePostHandler.java
Outdated
Show resolved
Hide resolved
Ah, that's exactly what happened, thanks. |
src/main/java/io/cryostat/net/web/http/api/v2/CertificatePostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v2/CertificatePostHandler.java
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v2/CertificatePostHandler.java
Outdated
Show resolved
Hide resolved
src/test/java/io/cryostat/net/web/http/api/v2/CertificatePostHandlerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/io/cryostat/net/web/http/api/v2/CertificatePostHandlerTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than that last tiny unit test comment. Would you like to try your hand at writing an integration test to exercise this as well?
Yes, that would be useful to learn. I'll let you know if I have questions |
e484bee
to
d9f58ee
Compare
d9f58ee
to
5d7d1a3
Compare
* Delete empty file when handling exception * Add unit test, apply formatting * Handle case when file.delete() fails * Prevent empty file creation * Close outstream when finished writing * Refactor file write, verify file not created * Pass outputStreamFunction to constructor * Apply spotless formatting * Add integration test * Move empty cert to test resources * Rename test * Remove unneeded assertion
* fix(rules): rule archiving and re-activation bugfixes * refactor * blocking * activate concurrently * cancel job when target disappears * fixup! cancel job when target disappears * apply existing rules to newly appearing targets
Fixes #494
I'd appreciate some feedback to make the code more readable.
After the
certValidator
tries to parse the cert and throws an exception,filePath.toFile().delete()
returns false if it failed. I'm not sure what's the cleanest way to handle this error since it's already in atry/catch
block?