-
Notifications
You must be signed in to change notification settings - Fork 19
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
Set Warning Header when handling preproc extension and validation #155
Conversation
...a better description on RFC 7234. |
Links to the referenced docs: |
We probably need to think about breaking the |
@@ -146,7 +146,7 @@ class WADLCheckerHeaderSingleSpec extends BaseCheckerSpec with LogAssertions { | |||
XML.loadFile("src/test/resources/xsd/test-urlxsd.xsd")) | |||
When("the wadl is translated") | |||
val checker = builder.build (inWADL, TestConfig(false, false, true, true, true, 1, | |||
true, true, true, "XalanC", | |||
true, false, true, "XalanC", |
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.
Why were all of these changed to no longer do the XSD Grammar Transform?
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.
These "checker" tests -- essentially confirm that the sate machine is created as expected. None of these tests test functionality related to the Grammar Transform, that's not the purpose of these tests, but in the past checking grammar didn't really affect the state machine in a way that the assertions in these tests check. Now that warnings are enabled by default the state machines changed so to prevent further changes, I've simply disabled setting the grammar transform in the config here. Actual grammar transform tests are checked elsewhere.
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.
Makes sense.
Wow. I just did a line count to see how many of those huge files there are and these are the ones over 2k lines each:
|
reqTypeAssertions(checker) | ||
wellFormedAssertions(checker) | ||
xsdAssertions(checker) | ||
And("The following assertions should also hold:") |
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.
Should this be Then("the...
?
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.
Yes, I'm really starting to regret that pattern here. Since this doesn't change the assertions that are checked I'll save these type of changes for #109.
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.
Actually, I guess this is a new test so I'll go ahead and change it.
This looks good to me. I just have the one question about no longer doing the XSD Grammar Transform and the couple of minor formatting things. |
re: The length of some of the test files. I couldn't agree more I have an open issue on this #109. |
fc88e73
to
572ed73
Compare
See RFC 7234 for description of warning header. We add a new step "SetHeaderAlways" to implement this.
572ed73
to
f58d32e
Compare
Added formatting fixes. |
Glad to hear about #109. |
See RFC 2616 (14.46)
The preproc extension transforms a message, we should be setting an appropriate Warning header.