Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Configuration + Legacy Response Comparison Testing #62

Closed
wants to merge 13 commits into from

Conversation

harrysolovay
Copy link
Contributor

@harrysolovay harrysolovay commented Nov 1, 2024

  1. There is now a MinaNetwork enum with two variants, Mainnet and Devnet.
  2. One now accesses the given network's PG pool by supplying the MinaNetwork.
let pool = mina_mesh.pool(network).await?;

Or in the context of a MinaMesh inherent impl:

let self = self.pool(network).await?;
  1. GraphQLClient's send method now accepts the MinaNetwork as an additional argument (note it is in the 0 position).
- self.graphql_client.send(SomeQuery::build(())).await?;
+ self.graphql_client.send(network, SomeQuery::build(())).await?;
  1. We now have a utility for asserting equality of the responses of sending the same requests to both MinaMesh and a specified endpoint (for our use, the Ocaml implementation).
let ctx = ResponseComparisonContext::new(mina_mesh, ENDPOINT.to_string());

ctx.assert_responses_eq("/account/balance", req_json).await?;

@harrysolovay harrysolovay changed the title LegacyComparisonContext ResponseComparisonContext Nov 1, 2024
@harrysolovay harrysolovay changed the title ResponseComparisonContext Network Configuration + Fixtures Nov 7, 2024
@harrysolovay harrysolovay changed the title Network Configuration + Fixtures Network Configuration + Legacy Response Comparison Testing Nov 7, 2024
@piotr-iohk piotr-iohk mentioned this pull request Nov 27, 2024
@piotr-iohk
Copy link
Collaborator

Closing in favor of #74.

@piotr-iohk piotr-iohk closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants