Skip to content
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 @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
monero: [ 0.18.1.2, 0.18.2.2, 0.18.3.1 ]
monero: [ 0.18.1.2, 0.18.3.3, 0.18.3.4, 0.18.4.0, 0.18.4.1, 0.18.4.2 ]

steps:
- uses: actions/checkout@v5
Expand Down
4 changes: 2 additions & 2 deletions tests/clients_tests/all_clients_interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub async fn run() {
subtract_fee_from_outputs: None,
mixin: Some(1000),
ring_size: Some(8),
unlock_time: Some(20),
unlock_time: Some(0),
payment_id: Some(PaymentId::zero()),
do_not_relay: Some(true),
};
Expand Down Expand Up @@ -878,7 +878,7 @@ pub async fn run() {
priority: TransferPriority::Default,
mixin: 5,
ring_size: 10,
unlock_time: 1,
unlock_time: 0,
below_amount: Some(Amount::from_pico(100000000000000)),
do_not_relay: Some(false),
get_tx_keys: None,
Expand Down
4 changes: 3 additions & 1 deletion tests/clients_tests/basic_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ 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..2, 22..27);
// Versions:
// https://github.com/monero-project/monero/blob/master/src/wallet/wallet_rpc_server_commands_defs.h
let expected_wallet_version = (1..2, 22..helpers::wallet::WALLET_VERSION_0_18_4_1 + 1);
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
23 changes: 21 additions & 2 deletions tests/clients_tests/helpers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ fn get_random_name() -> String {
.collect()
}

pub const WALLET_VERSION_0_18_4_0: u16 = 28;
pub const WALLET_VERSION_0_18_4_1: u16 = 29;

pub async fn get_version_assert_version(
wallet: &WalletClient,
expected_version: (Range<u16>, Range<u16>),
Expand Down Expand Up @@ -123,23 +126,39 @@ pub async fn open_wallet_with_no_or_empty_password_assert_ok(
}

pub async fn open_wallet_error_filename_invalid(wallet: &WalletClient, filename: &str) {
let version = wallet.get_version().await.unwrap();
let err = wallet
.open_wallet(filename.to_string(), None)
.await
.unwrap_err();
assert_eq!(err.to_string(), "Server error: Failed to open wallet");
let expected_error_message = if version.1 < WALLET_VERSION_0_18_4_0 {
"Server error: Failed to open wallet".to_owned()
} else {
// `wallets` directory is specified in tests/docker-compose.yml
format!(
"Server error: Failed to open wallet : file not found \"wallets/{}.keys\"",
filename
)
};
assert_eq!(err.to_string(), expected_error_message);
}

pub async fn open_wallet_error_wrong_password(
wallet: &WalletClient,
filename: &str,
password: Option<String>,
) {
let version = wallet.get_version().await.unwrap();
let err = wallet
.open_wallet(filename.to_string(), password)
.await
.unwrap_err();
assert_eq!(err.to_string(), "Server error: Failed to open wallet");
let expected_error_message = if version.1 < WALLET_VERSION_0_18_4_0 {
"Server error: Failed to open wallet"
} else {
"Server error: Failed to open wallet : Invalid password."
};
assert_eq!(err.to_string(), expected_error_message);
}

pub async fn restore_deterministic_wallet_assert_ok(
Expand Down