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

move graphql logic into integration_test_lib #13416

Merged
merged 15 commits into from
Jun 29, 2023

Conversation

QuiteStochastic
Copy link
Contributor

@QuiteStochastic QuiteStochastic commented Jun 15, 2023

https://app.zenhub.com/workspaces/velocity-62264fddc441a100183f7f86/issues/gh/minaprotocol/mina/13260

Previously, the only way for the test_executive to send graphql commands to nodes on the lucy testnet was to use the graphql functions in kubernetes_network.ml. However kubenetes_network.ml is within the package lib/integration_test_cloud_engine, which would make it inaccessible to any other hypothetical engine which we may want to develop, therefore the new engine would have to reimplement it all from scratch.

Therefore I have ported the graphql functions and surrounding logic from lib/integration_test_cloud_engine/kubernetes_network.ml to lib/integration_test_lib/graphql_requests.ml

It was a pretty direct port, the only real dependency was that the old functions required that the node be passed to them. That's really quite unnecessary, the functions only really need the Uri of the node, which is how the new functions work.

old:

val send_payment :
     logger:Logger.t
  -> t (* this is a Kubernetes_network.Node.t*)
  -> sender_pub_key:Signature_lib.Public_key.Compressed.t
  -> receiver_pub_key:Signature_lib.Public_key.Compressed.t
  -> amount:Currency.Amount.t
  -> fee:Currency.Fee.t
  -> signed_command_result Deferred.Or_error.t

new:

val send_payment :
     logger:Logger.t
  -> node_uri:Uri.t (* now we just pass in a common Uri.t type, which is a basic library type.  *)
  -> sender_pub_key:Signature_lib.Public_key.Compressed.t
  -> receiver_pub_key:Signature_lib.Public_key.Compressed.t
  -> amount:Currency.Amount.t
  -> fee:Currency.Fee.t
  -> signed_command_result Deferred.Or_error.t

@QuiteStochastic QuiteStochastic requested a review from a team as a code owner June 15, 2023 20:01
@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

Copy link
Member

@mrmr1993 mrmr1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm but see nits

src/app/test_executive/payments_test.ml Outdated Show resolved Hide resolved
src/lib/integration_test_lib/intf.ml Outdated Show resolved Hide resolved
src/lib/integration_test_lib/intf.ml Outdated Show resolved Hide resolved
@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic
Copy link
Contributor Author

!ci-build-me

@QuiteStochastic QuiteStochastic merged commit 21bfd90 into compatible Jun 29, 2023
@QuiteStochastic QuiteStochastic deleted the refactor_graphql_logic branch June 29, 2023 10:49
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