Repository navigation
Conversation
dab07a4 to
86b8218
Compare
3e294e7 to
4e54a98
Compare
4e54a98 to
e9a72a3
Compare
86b8218 to
cd9207b
Compare
cd9207b to
b6339fd
Compare
e9a72a3 to
1a0b966
Compare
| @@ -0,0 +1,7 @@ | |||
| # Seeds for failure cases proptest has generated in the past. It is | |||
There was a problem hiding this comment.
nit, "This file contains seeds for failure ..."?
There was a problem hiding this comment.
I've since changed how I'm testing config round-trip so this seed file isn't relevant. I've dropped it for now. The wording here is autogenerated by proptest.
|
|
||
| /// Create an arbitrary parsed JSON value used to exercise parser failure | ||
| /// paths. | ||
| fn arb_json() -> impl Strategy<Value = serde_json::Value> { |
There was a problem hiding this comment.
I'm not familiar with proptest at all, is the below construct something obvious assuming some familiarity with proptest or do we need some documentation?
There was a problem hiding this comment.
This function describes a proptest strategy to generate arbitrary serde_json::Values in a deterministic way. A simpler example of a strategy is the let leaf = prop_oneof![...] which selects the value of a key-value pair (either null, any bool, any i32, or a string matching that regex). The function also uses more complex strategies to generate Vecs and HashMaps where you give them a strategy and a capacity range.
The prop_recursive is the most complex part and it's mostly the example from the docs.
1a0b966 to
7664ff5
Compare
b6339fd to
0339909
Compare
7664ff5 to
ad140b0
Compare
ad140b0 to
f94444a
Compare
3bdee91 to
a05aa2c
Compare
e561d09 to
f24477f
Compare
03052c2 to
5d17b8d
Compare
tmakatos
left a comment
There was a problem hiding this comment.
I have to review this from scratch.
ca615d6 to
6d6dc41
Compare
Rework the QMP envelope, config round-trip, rolling counter reset and VM ownership tests into property-based tests, so they cover arbitrary inputs rather than a single hand-picked example. Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
6d6dc41 to
7a961ea
Compare
Rework the QMP envelope, config round-trip, rolling counter reset and VM
ownership tests into property-based tests, so they cover arbitrary inputs
rather than a single hand-picked example.
Signed-off-by: Leonardo Forchini leonardo.forchini@nutanix.com
Stack created with GitHub Stacks CLI • Give Feedback 💬