-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace example tool and gRPC client "tests" with CLI (#14)
The CLI is able to invoke all currently defined methods of `ConcordiumNodeClient`. The unit tests (which didn't actually perform any assertions) have been replaced with a script `test.sh` inside the CLI folder which executes all the same calls as these tests. This removes the need for an accessible node when running unit tests, meaning that we can start running `swift test` as part of the CI workflow.
- Loading branch information
Showing
10 changed files
with
262 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
examples/GetCryptographicParameters/Sources/GetCryptographicParameters/main.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# GrpcCli | ||
|
||
A small tool for demonstrating how to integrate the SDK as well as exercising the gRPC client | ||
which is otherwise hard to cover with unit tests. | ||
|
||
The CLI is organized into subcommands such as | ||
|
||
```shell | ||
GrpcCli cryptographic-parameters | ||
``` | ||
|
||
for retrieving the cryptographic parameters of the chain and | ||
|
||
```shell | ||
GrpcCli account <account-address> info --block-hash=<block-hash> | ||
``` | ||
|
||
for retrieving information about the account `<account-address>` as of block `<block-hash>`. | ||
|
||
By default, the tool attempts to query the gRPC interface of a node running on `localhost:20000`. | ||
Use the options `--host` and `--ip` (or a relay tool such as `socat`) to point it somewhere else. | ||
|
||
Use `GrpcCli --help` to explore the full command interface. | ||
|
||
The script [`./test.sh`](./test.sh) invokes all available commands. | ||
This will reveal if any of the commands exit with failure. | ||
Note, however, that it only "checks" if the commands exit successfully; | ||
it does not make assertions about the outputs. | ||
Use the environment variables `HOST` and `IP` to specify the gRPC endpoint to use in the script. |
Oops, something went wrong.