Skip to content

Commit

Permalink
deprecated legacy testing framework (whitebox_legacy)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Jul 14, 2023
1 parent bcf17d3 commit 30ad181
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 63 deletions.
2 changes: 2 additions & 0 deletions contracts/core/price-aggregator/tests/price_agg_setup/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_price_aggregator_sc::{staking::StakingModule, PriceAggregator};
use multiversx_sc::types::{Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded};
use multiversx_sc_modules::pause::PauseModule;
Expand Down
2 changes: 2 additions & 0 deletions contracts/core/price-aggregator/tests/price_agg_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_price_aggregator_sc::{
price_aggregator_data::{OracleStatus, TimestampedPrice, TokenPair},
staking::StakingModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use crowdfunding_esdt::*;
use multiversx_sc::types::{Address, EgldOrEsdtTokenIdentifier};
use multiversx_sc_scenario::{
Expand Down
63 changes: 0 additions & 63 deletions contracts/examples/empty/tests/empty_rust_test.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use std::borrow::Borrow;

use multisig::user_role::UserRole;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use core::iter::zip;

use multiversx_sc_scenario::{rust_biguint, testing_framework::BlockchainStateWrapper, DebugApi};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_sc::{
codec::multi_types::MultiValue2,
types::{BigUint, EgldOrEsdtTokenIdentifier, MultiValueEncoded, OperationCompletionStatus},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use forwarder::nft::{Color, ForwarderNftModule};
use multiversx_sc::{contract_base::ContractBase, types::EsdtLocalRole};
use multiversx_sc_scenario::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_sc::types::{
Address, EsdtLocalRole, EsdtTokenPayment, ManagedArgBuffer, ManagedVec, MultiValueEncoded,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use adder::*;
use forwarder::call_sync::*;
use num_traits::ToPrimitive;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_sc::types::{Address, ManagedVec, MultiValueEncoded};
use multiversx_sc_modules::governance::{
governance_configurable::GovernanceConfigurablePropertiesModule, governance_proposal::VoteType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_sc::types::{EgldOrEsdtTokenIdentifier, ManagedVec};
use multiversx_sc_modules::staking::StakingModule;
use multiversx_sc_scenario::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)] // TODO: migrate tests

use multiversx_sc::{
arrayvec::ArrayVec,
codec::Empty,
Expand Down
6 changes: 6 additions & 0 deletions framework/scenario/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ mod scenario_macros;
pub mod standalone;
pub mod test_wallets;
mod vm_go_tool;

#[deprecated(
since = "0.42.0",
note = "Use the blackbox testing framework instead. If needed, it also supports whitebox calls."
)]
pub mod whitebox_legacy;

/// Keeping this for backwards compatibility.
/// Unfortunately, the `deprecated` annotation doesn't function for reexports.
#[allow(deprecated)]
pub use whitebox_legacy as testing_framework;

pub use api::DebugApi;
Expand Down
2 changes: 2 additions & 0 deletions framework/scenario/src/whitebox_legacy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

mod address_factory;
mod contract_obj_wrapper;
mod mandos_generator;
Expand Down

0 comments on commit 30ad181

Please sign in to comment.