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

test: add monero 0.18.1.2 version #90

Merged
merged 2 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
monero: [ 0.17.3.0, 0.17.3.2, 0.18.0.0 ]
monero: [ 0.17.3.0, 0.17.3.2, 0.18.0.0, 0.18.1.2 ]

services:
monerod:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ async fn monero_daemon_transactions_test() {

## Testing

First, you'll need `docker` and `docker-compose` to run the RPC integration tests, which are in `tests/`, in case you don't want to run `monerod` and `monero-wallet-rpc` on your own.
First, you'll need `docker` and `docker compose` to run the RPC integration tests, which are in `tests/`, in case you don't want to run `monerod` and `monero-wallet-rpc` on your own.

If you have the docker stack installed, go to the `tests` folder and run `docker-compose up`. Note that the daemon will run on port `18081` and `monero-wallet-rpc` will run on port `18083`.
If you have the docker stack installed, go to the `tests` folder and run `docker compose up`. Note that the daemon will run on port `18081` and `monero-wallet-rpc` will run on port `18083`.

After that, just run `cargo test` as you normally would.

Also, you can run `docker-compose down` to stop and remove the two containers started by `docker-compose up`.
Also, you can run `docker compose down` to stop and remove the two containers started by `docker compose up`.

**Important**: the blockchain must be empty when running the `main_functional_test` test on `tests/rpc.rs`, i.e. it must have only the genesis block. In `regtest`, the blockchain restarts when `monerod` restarts (as a side note, if you want to keep the blockchain in `regtest` between restarts, you should pass the `--keep-fakechain` flag when starting `monerod`).

Expand Down
2 changes: 1 addition & 1 deletion tests/clients_tests/basic_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub async fn run() {
// where errors could happen.
// Note that the wallets created in this step are created "from scratch", i.e.
// they are not created from known spend/view keys.
let expected_wallet_version = (1, 22..26);
let expected_wallet_version = (1..2, 22..27);
helpers::wallet::get_version_assert_version(&wallet, expected_wallet_version).await;

let (wallet_with_pwd, wallet_with_no_pwd, wallet_with_empty_pwd) = tokio::join!(
Expand Down
4 changes: 2 additions & 2 deletions tests/clients_tests/helpers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ fn get_random_name() -> String {

pub async fn get_version_assert_version(
wallet: &WalletClient,
expected_version: (u16, Range<u16>),
expected_version: (Range<u16>, Range<u16>),
) {
let version = wallet.get_version().await.unwrap();
assert_eq!(version.0, expected_version.0);
assert!(expected_version.0.contains(&version.0));
assert!(expected_version.1.contains(&version.1));
}

Expand Down
6 changes: 3 additions & 3 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.7"
version: "3.9"
services:
monerod:
image: ghcr.io/farcaster-project/containers/monerod:0.18.0.0
image: ghcr.io/farcaster-project/containers/monerod:0.18.1.2
environment:
NETWORK: regtest
OFFLINE: --offline
Expand All @@ -10,7 +10,7 @@ services:
- 18081:18081

monero-wallet-rpc:
image: ghcr.io/farcaster-project/containers/monero-wallet-rpc:0.18.0.0
image: ghcr.io/farcaster-project/containers/monero-wallet-rpc:0.18.1.2
environment:
MONERO_DAEMON_ADDRESS: monerod:18081
WALLET_RPC_PORT: 18083
Expand Down