liftedinit / many-rs

Rust libraries for the Many Protocol
Apache License 2.0
5 stars 11 forks source link

Introspection tools #266

Open fmorency opened 2 years ago

fmorency commented 2 years ago

Resiliency tests are currently tedious to develop because of the lack of introspection tooling. CBOR response messages need to be parsed manually using tools such as grep, awk, sed, and the like. Moreover, GNU tools (Linux) are not 100% compatible with BSD tools (macOS).

It would be useful to have an in-house tool to allow one to easily query(/create?) MANY (CBOR-)encoded messages,

E.g.,

hansl commented 2 years ago

We could use a CBOR-to-JSON tool (or implement our own JSON output), wdyt?

I found this the other day while looking for a cbor equivalent of jq; https://github.com/thanatos/cq. It seems like it could work on surface.

hansl commented 2 years ago

And yes, having a CBOR parser and Path-like querying syntax would be great. Not sure if that's something we want to spend time developing though.

Another alternative would be to move our BATS tests to Rust and using the libraries we already use.

fmorency commented 2 years ago

We could use a CBOR-to-JSON tool (or implement our own JSON output), wdyt?

I found this the other day while looking for a cbor equivalent of jq; https://github.com/thanatos/cq. It seems like it could work on surface.

I feel like this is trading one manual parsing tool for another. Not sure of the gain here.

And yes, having a CBOR parser and Path-like querying syntax would be great. Not sure if that's something we want to spend time developing though.

Another alternative would be to move our BATS tests to Rust and using the libraries we already use.

How do you see Docker handling if we use Rust instead of BATS?

Perhaps we could explore cargo-make. Tendermint is using it with Docker for testing.