To test generators in compatibility suite, I have ...
# libpact_ffi-users
t
To test generators in compatibility suite, I have to use Integration Json. But there are some difficulties: •
pact:generator:type
is only optional,
pact:matcher:type
is still required • Set
pact:matcher:type
to
null
or
integer
is the easiest way • If I set
pact:matcher:type
to something like
type
, I need to also set
value
, which prevent
pact:generator:type
from working • But I got these errors
Could not generate a random decimal from null
• Other generator like
date
,
time
,
datetime
or
boolean
works fine because they don't validate the
value
• Is this change a good idea: https://github.com/pact-foundation/pact-reference/compare/master...tienvx:pact-reference:force-generator-works-regardless-value-type?expand=1
I found a very similar block of code here https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_models/src/generators/mod.rs#L854, so I think it's fine to do like that as well.