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 a WebAc ACL header to response #48
Conversation
return; | ||
} | ||
} | ||
assertEquals("Missing Link Header " + aclLink.toString(), 1, 0); |
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.
@awoods @acoburn @peichman-umd
This is the cause of the conflict. I can solve it, but I know this is ugly and would appreciate any suggestions.
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.
@whikloj in this case, you can just roll back the change on this line from #47 so you get:
try (final CloseableHttpResponse response = execute(request)) {
assertEquals(HttpStatus.SC_OK, getStatus(response));
// the rest of your code from your PR
}
It's fine to use the try
block if you actually need to inspect the response. For merely checking the status code it was unnecessary.
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.
@acoburn but is a for loop the best way to do this type of testing? It seems very basic, but perhaps I am just expecting more.
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.
Oh, that code should definitely be changed:
Optional<String> header = Arrays.asList(response.getHeaders("Link")).stream().map(Header::getValue).filter(aclLink::equals).findFirst();
assertTrue("Missing Link header", header.isPresent());
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.
@acoburn++
So the conflicts here are related to the DelegateHeader. I'll have to rebase my changes on fcrepo4 and fcrepo-module-auth-webac to test. I'll do it in the morning. |
Rebased on master. |
Resolved with: 6d7f196 |
Addresses FCREPO-1795
Requires fcrepo/fcrepo#939