Skip to content

Commit

Permalink
Introduce additional test folder to make cargo check happy
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Jul 27, 2024
1 parent 01af724 commit ea895d8
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ unit-test = "test --lib"
schema = "run --bin schema"
# test-tube = "test --test * --features test-tube -- --test-threads=1"
test-tube = "test --test test-tube --features test-tube -- --test-threads=1"
prop-test = "test --test prop-test --features test-tube -- --test-threads=1"
prop-test = "test --test prop-test --features test-tube -- --test-threads=1 --nocapture"
test-tube-build = "build --release --lib --target wasm32-unknown-unknown --target-dir ./test-tube-build"
4 changes: 2 additions & 2 deletions smart-contracts/osmosis/contracts/cl-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ name = "schema"

[[test]]
name = "test-tube"
path = "tests/integration.rs"
path = "tests/test-tube/integration.rs"
required-features = ["test-tube"]

[[test]]
name = "prop-test"
path = "tests/fuzzer.rs"
path = "tests/test-tube/fuzzer.rs"
required-features = ["test-tube"]

[features]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{fixture_default, PERFORMANCE_FEE_DEFAULT};

use cl_vault::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
fixture_dex_router, ACCOUNTS_INIT_BALANCE, ACCOUNTS_NUM, DENOM_BASE, DENOM_QUOTE,
MAX_SLIPPAGE_HIGH, PERFORMANCE_FEE_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
fixture_default, get_amount_from_denom, DENOM_BASE, DENOM_QUOTE, PERFORMANCE_FEE_DEFAULT,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
calculate_expected_refunds, fixture_dex_router, get_balance_amount,
get_event_attributes_by_ty_and_key, ACCOUNTS_INIT_BALANCE, ACCOUNTS_NUM, DENOM_BASE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
fixture_default, get_event_attributes_by_ty_and_key, ACCOUNTS_INIT_BALANCE, DENOM_BASE,
DENOM_QUOTE, PERFORMANCE_FEE_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
fixture_default, DENOM_BASE, DENOM_QUOTE, MAX_SLIPPAGE_HIGH, PERFORMANCE_FEE_DEFAULT,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
get_event_attributes_by_ty_and_key, init_test_contract, MAX_SLIPPAGE_HIGH,
PERFORMANCE_FEE_DEFAULT,
Expand Down Expand Up @@ -337,7 +335,6 @@ proptest! {
percentages in get_percentage_list(),
account_indexes in get_account_index_list()
) {
println!("start");
let (app, contract_address, _cl_pool_id, admin_account, _deposit_ratio, _deposit_ratio_approx) = init_test_contract(
"./test-tube-build/wasm32-unknown-unknown/release/cl_vault.wasm",
&[
Expand Down Expand Up @@ -368,7 +365,6 @@ proptest! {
Uint128::zero(),
PERFORMANCE_FEE_DEFAULT
);
println!("wasm");
let wasm = Wasm::new(&app);
let cl = ConcentratedLiquidity::new(&app);
let bank = Bank::new(&app);
Expand All @@ -387,7 +383,6 @@ proptest! {
}

for i in 0..ITERATIONS_NUMBER {
println!("iter");
match actions[i] {
Action::Deposit => {
deposit(&wasm, &bank, &contract_address, &accounts[account_indexes[i] as usize], percentages[i], DENOM_BASE, DENOM_QUOTE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "test-tube")]

use crate::setup::{
fixture_default, fixture_dex_router, init_test_contract, ADMIN_BALANCE_AMOUNT, DENOM_BASE,
DENOM_QUOTE, MAX_SLIPPAGE_HIGH, PERFORMANCE_FEE_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg(feature = "test-tube")]
#![allow(dead_code)]

use cl_vault::{helpers::generic::sort_tokens, msg::InstantiateMsg, state::VaultConfig};
Expand Down

0 comments on commit ea895d8

Please sign in to comment.