Conversation
This provides simple "jq" style facility for transforming a JSON/YAML document to make it easier to write assertions against more complex data. While a Go implementation of jq does exist it is very large, so opting instead for this much simpler one. Signed-off-by: Jussi Maki <jussi@isovalent.com>
|
Another option here could be to use Both still have the problem that they don't fully support comparisons. JMESPath can do some filtering to do some of it but would be nice to find a lightweight option that allows doing jq-style comparisons, e.g. We could consider embedding |
|
Did you consider whether we can use this in combination with |
Ah good point. I'll think about this. |
|
I'm now starting to lean towards just using |
This provides simple "jq" style facility for transforming a JSON/YAML document to make it easier to write assertions against more complex data.
While a Go implementation of jq does exist it is very large, so opting instead for this much simpler one.
This uses the sigs.k8s.io/yaml to load a YAML document as this way we handle them the same way as Kubernetes and can work on e.g. CRDs in the way one expects.