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

refactor: enable ITs for centrifuge + dev runtimes #1938

Merged
merged 2 commits into from
Aug 1, 2024
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
28 changes: 14 additions & 14 deletions runtime/integration-tests/src/cases/liquidity_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ mod foreign_investments {
mod same_currencies {
use super::*;

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn increase_deposit_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -747,7 +747,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn decrease_deposit_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -837,7 +837,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn cancel_deposit_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -937,7 +937,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn collect_deposit_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1078,7 +1078,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn collect_investment<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1301,7 +1301,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn increase_redeem_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1354,7 +1354,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn cancel_redeem_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1449,7 +1449,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn collect_redeem_request<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1631,7 +1631,7 @@ mod foreign_investments {
mod should_throw_requires_collect {
use super::*;

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_requires_collect<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1711,7 +1711,7 @@ mod foreign_investments {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn redeem_requires_collect<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1802,7 +1802,7 @@ mod foreign_investments {
mod payment_payout_currency {
use super::*;

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn redeem_payout_currency_not_found<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1862,7 +1862,7 @@ mod foreign_investments {
mod mismatching_currencies {
use super::*;

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn collect_foreign_investment_for<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -1975,7 +1975,7 @@ mod foreign_investments {

/// Invest, fulfill swap foreign->pool, cancel, fulfill swap
/// pool->foreign
#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn cancel_unprocessed_investment<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down Expand Up @@ -2121,7 +2121,7 @@ mod foreign_investments {

/// Invest, fulfill swap foreign->pool, process 50% of investment,
/// cancel, swap back pool->foreign of remaining unprocessed investment
#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn cancel_partially_processed_investment<T: Runtime + FudgeSupport>() {
let mut env = FudgeEnv::<T>::from_parachain_storage(
Genesis::default()
Expand Down
14 changes: 7 additions & 7 deletions runtime/integration-tests/src/cases/lp/investments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ mod with_pool_currency {
use super::{utils, *};
use crate::cases::lp::utils as lp_utils;

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn currency_invest<T: Runtime>() {
let mut env = setup_full::<T>();
env.state_mut(|evm| {
Expand Down Expand Up @@ -189,7 +189,7 @@ mod with_pool_currency {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn currency_collect<T: Runtime>() {
let mut env = setup_full::<T>();
env.state_mut(|evm| {
Expand Down Expand Up @@ -257,7 +257,7 @@ mod with_pool_currency {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_cancel_full<T: Runtime>() {
let mut env = setup_full::<T>();
env.state_mut(|evm| {
Expand Down Expand Up @@ -335,7 +335,7 @@ mod with_foreign_currency {
POOL_A,
};

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_cancel_full_before_swap<T: Runtime>() {
let mut env = setup_full::<T>();
env.state_mut(|evm| {
Expand Down Expand Up @@ -393,7 +393,7 @@ mod with_foreign_currency {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_cancel_full_after_swap<T: Runtime>() {
let mut env = setup_full::<T>();

Expand Down Expand Up @@ -486,7 +486,7 @@ mod with_foreign_currency {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_cancel_full_after_swap_partially<T: Runtime>() {
let mut env = setup_full::<T>();
let part = Quantity::checked_from_rational(1, 2).unwrap();
Expand Down Expand Up @@ -589,7 +589,7 @@ mod with_foreign_currency {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn invest_cancel_full_after_swap_partially_inter_epoch_close<T: Runtime>() {
let mut env = setup_full::<T>();
let part = Quantity::checked_from_rational(1, 3).unwrap();
Expand Down
18 changes: 9 additions & 9 deletions runtime/integration-tests/src/cases/lp/pool_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::{
},
};

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn add_currency<T: Runtime>() {
let mut env = super::setup::<T, _>(|_| {});

Expand Down Expand Up @@ -127,7 +127,7 @@ fn add_currency<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn add_pool<T: Runtime>() {
let mut env = super::setup::<T, _>(|_| {});
const POOL: PoolId = 1;
Expand Down Expand Up @@ -172,7 +172,7 @@ fn add_pool<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn hook_address<T: Runtime>() {
let env = super::setup::<T, _>(|_| {});
env.state(|evm| {
Expand All @@ -185,7 +185,7 @@ fn hook_address<T: Runtime>() {
})
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn add_tranche<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down Expand Up @@ -267,7 +267,7 @@ fn add_tranche<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn allow_investment_currency<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down Expand Up @@ -319,7 +319,7 @@ fn allow_investment_currency<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn disallow_investment_currency<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down Expand Up @@ -372,7 +372,7 @@ fn disallow_investment_currency<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn update_member<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down Expand Up @@ -456,7 +456,7 @@ fn update_member<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn update_tranche_token_metadata<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down Expand Up @@ -551,7 +551,7 @@ fn update_tranche_token_metadata<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn update_tranche_token_price<T: Runtime>() {
let mut env = super::setup::<T, _>(|evm| {
super::setup_currencies(evm);
Expand Down
8 changes: 4 additions & 4 deletions runtime/integration-tests/src/cases/lp/transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ mod utils {
}
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn transfer_tokens_from_local<T: Runtime>() {
let mut env = super::setup_full::<T>();
utils::prepare_hold_usdc_local::<T>(&mut env);
Expand Down Expand Up @@ -173,7 +173,7 @@ fn transfer_tokens_from_local<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn transfer_tranche_tokens_from_local<T: Runtime>() {
let mut env = super::setup_full::<T>();

Expand Down Expand Up @@ -235,7 +235,7 @@ fn transfer_tranche_tokens_from_local<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn transfer_tranche_tokens_domain_to_local_to_domain<T: Runtime>() {
let mut env = super::setup_full::<T>();
utils::prepare_hold_tt_domain::<T>(&mut env);
Expand Down Expand Up @@ -313,7 +313,7 @@ fn transfer_tranche_tokens_domain_to_local_to_domain<T: Runtime>() {
});
}

#[test_runtimes([development])]
#[test_runtimes([centrifuge, development])]
fn transfer_tranche_tokens_domain_to_local<T: Runtime>() {
let mut env = super::setup_full::<T>();
utils::prepare_hold_tt_domain::<T>(&mut env);
Expand Down
Loading