Skip to content

Commit

Permalink
chore: use pretty_assertions and fix gas issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Lindahl committed Oct 12, 2023
1 parent 677a18d commit 88337b3
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions workspaces-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ thiserror.workspace = true
[dev-dependencies]
near-crypto = "0.15.0"
tokio = "1.21.1"
pretty_assertions = "1.4.0"

[target.'cfg(not(windows))'.dev-dependencies]
near-workspaces = "0.8"
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/counter_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use near_sdk::serde_json::json;
use near_workspaces::{Account, Contract};
use pretty_assertions::assert_eq;

const WASM: &[u8] =
include_bytes!("../../target/wasm32-unknown-unknown/release/counter_multisig.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/escrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use near_sdk::{
serde_json::{self, json},
};
use near_workspaces::{Account, AccountId, Contract};
use pretty_assertions::assert_eq;
use tokio::join;

const WASM: &[u8] = include_bytes!("../../target/wasm32-unknown-unknown/release/escrow.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/fungible_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use near_sdk::{json_types::U128, serde_json::json};
use near_workspaces::{Account, AccountId, Contract};
use pretty_assertions::assert_eq;

const WASM: &[u8] =
include_bytes!("../../target/wasm32-unknown-unknown/release/fungible_token.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/native_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use near_workspaces::{
types::{AccessKeyPermission, Finality},
Account, AccountDetailsPatch, Contract, DevNetwork, Worker,
};
use pretty_assertions::assert_eq;
use tokio::{join, time::sleep};

const WASM: &[u8] =
Expand Down
3 changes: 2 additions & 1 deletion workspaces-tests/tests/non_fungible_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use near_sdk_contract_tools::standard::{
nep297::Event,
};
use near_workspaces::{operations::Function, types::Gas};
use pretty_assertions::assert_eq;
use tokio::task::JoinSet;
use workspaces_tests_utils::{expect_execution_error, nft_token, setup, Setup};

Expand Down Expand Up @@ -708,7 +709,7 @@ async fn transfer_call_receiver_send_return() {
"receiver_id": bob.id(),
"msg": format!("transfer:{}", charlie.id()),
}))
.gas(THIRTY_TERAGAS) // xtra gas
.gas(THIRTY_TERAGAS.saturating_mul(10)) // xtra gas
.deposit(1)
.transact()
.await
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/rbac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use near_sdk::{
serde_json::{self, json},
};
use near_workspaces::{Account, AccountId, Contract};
use pretty_assertions::assert_eq;
use tokio::join;

const WASM: &[u8] = include_bytes!("../../target/wasm32-unknown-unknown/release/rbac.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/simple_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use near_sdk::serde_json::json;
use near_workspaces::{Account, Contract};
use pretty_assertions::assert_eq;

const WASM: &[u8] =
include_bytes!("../../target/wasm32-unknown-unknown/release/simple_multisig.wasm");
Expand Down
1 change: 0 additions & 1 deletion workspaces-tests/tests/storage_fee.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg(not(windows))]

use near_sdk::{json_types::U128, serde_json::json, ONE_NEAR};

use near_workspaces::{sandbox, Account, Contract, DevNetwork, Worker};

const WASM: &[u8] = include_bytes!("../../target/wasm32-unknown-unknown/release/storage_fee.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use near_sdk::{
serde::Serialize,
};
use near_workspaces::{Account, Contract};
use pretty_assertions::assert_eq;

const WASM_BORSH: &[u8] =
include_bytes!("../../target/wasm32-unknown-unknown/release/upgrade_old_borsh.wasm");
Expand Down
1 change: 1 addition & 0 deletions workspaces-tests/tests/upgrade_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use near_sdk::{json_types::Base64VecU8, serde_json::json};
use near_workspaces::{Account, Contract};
use pretty_assertions::assert_eq;

const WASM: &[u8] =
include_bytes!("../../target/wasm32-unknown-unknown/release/upgrade_old_multisig.wasm");
Expand Down

0 comments on commit 88337b3

Please sign in to comment.