You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.IllegalArgumentException: incorrect expectation json format for:
{
"httpRequest" : {
"method" : "POST",
"path" : "/v1/customer/update"
},
"id" : "b3100a82-c364-4617-81ea-3e6d6889219c",
"priority" : 0,
"timeToLive" : {
"unlimited" : true
},
"times" : {
"unlimited" : true
}
}
schema validation errors:
11 errors:
- $.httpError: is missing, but is required, if specifying action of type Error
- $.httpForward: is missing, but is required, if specifying action of type Forward
- $.httpForwardClassCallback: is missing, but is required, if specifying action of type ForwardClassCallback
- $.httpForwardObjectCallback: is missing, but is required, if specifying action of type ForwardObjectCallback
- $.httpForwardTemplate: is missing, but is required, if specifying action of type ForwardTemplate
- $.httpOverrideForwardedRequest: is missing, but is required, if specifying action of type OverrideForwardedRequest
- $.httpResponse: is missing, but is required, if specifying action of type Response
- $.httpResponseClassCallback: is missing, but is required, if specifying action of type ResponseClassCallback
- $.httpResponseObjectCallback: is missing, but is required, if specifying action of type ResponseObjectCallback
- $.httpResponseTemplate: is missing, but is required, if specifying action of type ResponseTemplate
- oneOf of the following must be specified [httpError, httpForward, httpForwardClassCallback, httpForwardObjectCallback, httpForwardTemplate, httpOverrideForwardedRequest, httpResponse, httpResponseClassCallback, httpResponseObjectCallback, httpResponseTemplate]
OpenAPI Specification: https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.15.x
Documentation: https://mock-server.com/mock_server/creating_expectations.html
EDIT
Regarding using withClientCertificateChain() with verify(): I just found in the logs that the client includes the certificate chain information in the verify request, so it's the server that is ignoring it (otherwise this verification would have failed because the DN does not match the request):
Is the server discarding the clientCertificateChain information entirely? Because when we retrieve the above request with mockServer.retrieveRecordedRequests(null, Format.JSON), the clientCertificateChain field is not included in the request information.
At this point I'm out of ideas. There seems to be no way to assert the client certificate information.
The text was updated successfully, but these errors were encountered:
Describe the issue
Couldn't figure out how to use the method
withClientCertificateChain()
:verify()
it does nothing (verify succeeds even if the condition is not met)when()
, the server complains that the expectation request is malformed - example code and error belowMockServer version
5.15.0 (but also tested in latest git version)
To Reproduce
Steps to reproduce the issue:
ClientAndServer.startClientAndServer()
EDIT
Regarding using
withClientCertificateChain()
withverify()
: I just found in the logs that the client includes the certificate chain information in the verify request, so it's the server that is ignoring it (otherwise this verification would have failed because the DN does not match the request):Corresponding request (note the server detected the client certificate correctly):
EDIT 2
Is the server discarding the clientCertificateChain information entirely? Because when we retrieve the above request with
mockServer.retrieveRecordedRequests(null, Format.JSON)
, theclientCertificateChain
field is not included in the request information.At this point I'm out of ideas. There seems to be no way to assert the client certificate information.
The text was updated successfully, but these errors were encountered: