Hello, is it possible to set loose expectations on...
# pact-jvm
t
Hello, is it possible to set loose expectations on a range of status code like 2xx ? I stumbled across https://github.com/pact-foundation/pact-specification/issues/68 but it wasn't overly clear if this is possible now or not ?
u
This has been implemented as part of the V4 spec changes in v4.3.x. The DSL now has methods like
successStatus()
which will match all status codes from 200-299
t
Perfect that's exactly what I needed. Thank you :)
@uglyog sorry just to follow up on this, if the provider side (e.g. pact go) is stuck using v2 spec, is there anything i can do for this or am i forced to specify just one specific status code and i assume id be having to use v2 spec on consumer side (jvm) too?
u
No, sorry, the V2 implementations don't have anything like this
t
ok thanks, what about v3 spec?
u
No, it was added in V4
But anything that supports V3 should also have V4 support
t
hm ok, unfortunately the person helping me on pact go provider side is on m1 mac and having issues getting up and running with v3 spec so i think we might have to use v2 spec
thanks for the info