feat: introduce apitester tool#4266
Conversation
|
@another-rex I think this is pretty much ready to go, just want to check if we should do more or less JSON replacing |
another-rex
left a comment
There was a problem hiding this comment.
Looks great! I'm on the fence about whether to compress the versions list, as it is really really long, but we probably do want to test its output. Probably the best compromise is to just to replace versions array with the length of the list.
@michaelkedar Can you take a look as well?
|
yeah I was thinking about that and then realized in Reducing them to just a count makes sense I think, especially if we do a deduplicate too |
|
This looks good to me! I wonder if it'd be a good idea to replace some of the stripped fields with a base64 blob hash or or something, so we can see if they change? (Though, I know if changes in database_specific are really actionable for us). |
fwiw just as I realized I hadn't mentioned this here: the reason I'm placeholder'ing |
|
We probably should do a sort keys on database specific before we return it |
This would also be true for
From the API side, this seems to be something happening in the ESPv2 translation, and I don't think we have control over it. |
|
I think unless we think that not having |
|
/gcbrun |
|
hmm the force push might have broke the CI somehow... |
Hopefully the readme explains most of this, but at a high-level this introduces a new tool based off
osv-scannerto make it easy to test API changes.Tests are provided as "cassettes" which we use
go-vcrto load since that has the bonus benefit of being compatible with cassettes we'll be using inosv-scanner, though we do format therequest.bodyto be multi-line so it's easier to understand what the query under test is.