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

Refactor apitest cases to use GrpcClient #5244

Merged
merged 14 commits into from
Feb 26, 2021

Conversation

ghubstan
Copy link
Member

@ghubstan ghubstan commented Feb 26, 2021

This is a follow up to PR #5240, which moved client side gRPC boilerplate to a new, reusable GrpcClient class.

From this change forward, all client side gRPC request/response boilerplate (including any used by tests) should now live in GrpcClient.

PR #5240 should be reviewed/merged before this one.

RobotBob reads a json file instructing it to make and take offers
as per an 'actions' json array, e.g. ["make","take","take","make],
and the tester will manually run CLI commands provided by the bot
during each step in a trade.

The test case (ScriptedBotTest) can be run with the test harness,
which will start and shutdown all the regtest/dao app: bitcoind,
seednode, arbnode, bob & alice nodes.  The test case can also be
run without the test harness, and the user manages his own daemons.

Usage will be described in the PR before it leaves draft stage.
Codacy is right.  Don't use instance of ex, add a catch clause.
Also removed an unnecessary fully qualified name 'String.format'.
The BaseCurrencyNetwork#getDefaultMinFeePerVbyte now returns
15 (sats/byte) since commit b341bb6.

This change adjusts the api to the new min tx fee rate by validating
the api's setTxFeeRatePreference param, and throwing an appropirate
exception if the param value is below the minimum.  Also adjusted a broken
test, and added a new test to check the appropriate exception is received
from the server.
Commit c33ac1b changed the source of
the min tx fee rate, and the api will adjust after the associated PR
is merged.  For now, the required change is a comment.
CliMain no longer uses gRPC stubs directly, just parses &
validates command options, and prints responses.

Also, anticipates reuse by java bots (avoiding grpc boilerplate
duplication on the client side), reduces size of CliMain class, and
will allow clean up of duplicated grpc boilerplate in apitest cases.
This is a follow up to PR bisq-network#5240,
which moved client side gRPC boilerplate to a new, reusable GrpcClient class.

From this change forward, all (including test) client side gRPC request/response
boilerplate should now live in GrpcClient.
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@sqrrm sqrrm merged commit 11a1167 into bisq-network:master Feb 26, 2021
@ripcurlx ripcurlx added this to the v1.6.0 milestone Mar 11, 2021
@ghubstan ghubstan deleted the 001-adjust-apitest-for-grpc-client branch March 18, 2021 17:01
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.

3 participants