Skip to content

Commit

Permalink
Add integration test pinned to tendermint-go v0.33.5 (#324)
Browse files Browse the repository at this point in the history
* Add integration test pinned to tendermint-go v0.33

Closes #304

Also renames test-integration-ignored to test-integration-latest.

With this change, CI runs two integration tests:

1. A `stable` test to protect against regressions, run against a pinned
version of the tendermint/tendermint docker image.
2. A `latest` test to track whether we're maintaining parity with the
latest development version of tendermint-go.

Signed-off-by: Shon Feder <shon@informal.systems>

* Remove test for hardcoded ABCI version

Hardcoding a test for the version in this way makes it impossible to run the
integration tests against different ABCI versions.

This change proposes one solution to address this problem and to the
underlying issue behind, e.g.,

- #249
- #238
- #233

My sense is that, if we want to set a strict abci version requirement
for the rpc client, then we should put that in the source code itself.

E.g., we might put a check on the client that ensures the abci version
is within a specified version range known to be supported. If the
version is outside that range, we could either error out or log
errors/warning to alert users that we don't guarantee compatibility.

However, the current approach of hardcoding in a version in the
integration test seems to create a lot of busy work due to uninformative
test failures and it's not obvious what value it delivers. If the
integration tests are meant to test that the RPC client integrates
correctly with ACBI, should we really consider integration to have
failed when everything works as expected while interfacing with an
older (or newer) version?

Signed-off-by: Shon Feder <shon@informal.systems>

* Update changelog

Signed-off-by: Shon Feder <shon@informal.systems>
  • Loading branch information
Shon Feder committed Jun 15, 2020
1 parent 740cb66 commit 704e244
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,35 @@ jobs:
command: test
args: --all-features --no-fail-fast

test-integration-ignored:
# TODO(shonfeder): remove duplication once GitHub addresses one of these
# - https://github.community/t/support-for-yaml-anchors/16128/15
# - https://github.community/t/reusing-sharing-inheriting-steps-between-jobs-declarations/16851/13
# - https://github.community/t/using-matrix-variable-in-docker-image-name/17296
test-integration-stable:
runs-on: ubuntu-latest
services:
tendermint:
image: tendermint/tendermint
image: tendermint/tendermint:v0.33.5
ports:
- 26656:26656
- 26657:26657
- 26660:26660
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: -p tendermint --test integration --no-fail-fast -- --ignored

test-integration-latest:
runs-on: ubuntu-latest
services:
tendermint:
image: tendermint/tendermint:latest
ports:
- 26656:26656
- 26657:26657
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ CommitSig:
- Added CommitSig timestamp zero-check compatibility code [#259](https://github.com/informalsystems/tendermint-rs/issues/259)

Testing:
- Updated abci_info test to 0.17.0 ([#249](https://github.com/informalsystems/tendermint-rs/issues/249))
- Add integration test to track tendermint-go v0.33.5 ([#324](https://github.com/informalsystems/tendermint-rs/pull/324))
- Remove test for hard-coded version in `abci_info` ([#324](https://github.com/informalsystems/tendermint-rs/pull/324))

Serialization:
- Refactor serializers library to use modules, give a nicer annotation to structs and separated into its own folder. ([#247](https://github.com/informalsystems/tendermint-rs/issues/247))
Expand Down
1 change: 0 additions & 1 deletion tendermint/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ mod rpc {
async fn abci_info() {
let abci_info = localhost_rpc_client().abci_info().await.unwrap();

assert_eq!(&abci_info.version, "0.17.0");
assert_eq!(abci_info.app_version, 1u64);
// the kvstore app's reply will contain "{\"size\":0}" as data right from the start
assert_eq!(&abci_info.data, "{\"size\":0}");
Expand Down

0 comments on commit 704e244

Please sign in to comment.