Skip to content

Commit

Permalink
Merge pull request #3 from persistenceOne/betterclever/test-tube-x
Browse files Browse the repository at this point in the history
Test Tube x package for differentiation from Osmosis' package on crates.io
  • Loading branch information
betterclever authored Oct 11, 2023
2 parents edf2b7f + 3b04149 commit c4b4498
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 31 deletions.
4 changes: 2 additions & 2 deletions packages/persistence-test-tube/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ edition = "2021"
license = "MIT OR Apache-2.0"
name = "persistence-test-tube"
repository = "https://github.com/persistenceOne/test-tube"
version = "0.2.0"
version = "0.2.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

exclude = ["persistenceCore", "test_artifacts"]
Expand All @@ -17,7 +17,7 @@ persistence-std = "0.1.6"
prost = "0.12.0"
serde = "1.0.144"
serde_json = "1.0.85"
test-tube = {version = "0.1.7", path = "../test-tube", features = ["module-wrappers"]}
test-tube-x = {version = "0.2.0", path = "../test-tube-x", features = ["module-wrappers"]}
thiserror = "1.0.34"

[build-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func Execute(envId uint64, base64ReqDeliverTx string) *C.char {

resDeliverTx := env.App.DeliverTx(reqDeliverTx)

fmt.Println("resDeliverTx", resDeliverTx.Data)
bz, err := proto.Marshal(&resDeliverTx)

// fmt.Printf("err: %v\n", err)
Expand Down
10 changes: 5 additions & 5 deletions packages/persistence-test-tube/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub use cosmrs;

pub use module::*;
pub use runner::app::PersistenceTestApp;
pub use test_tube::account::{Account, FeeSetting, NonSigningAccount, SigningAccount};
pub use test_tube::runner::error::{DecodeError, EncodeError, RunnerError};
pub use test_tube::runner::result::{ExecuteResponse, RunnerExecuteResult, RunnerResult};
pub use test_tube::runner::Runner;
pub use test_tube::{fn_execute, fn_query};
pub use test_tube_x::account::{Account, FeeSetting, NonSigningAccount, SigningAccount};
pub use test_tube_x::runner::error::{DecodeError, EncodeError, RunnerError};
pub use test_tube_x::runner::result::{ExecuteResponse, RunnerExecuteResult, RunnerResult};
pub use test_tube_x::runner::Runner;
pub use test_tube_x::{fn_execute, fn_query};
6 changes: 3 additions & 3 deletions packages/persistence-test-tube/src/module/gov.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use persistence_std::shim::Any;
use persistence_std::types::cosmos::base::v1beta1::Coin;
use persistence_std::types::cosmos::gov::v1::{MsgSubmitProposal, MsgSubmitProposalResponse, MsgVoteResponse, QueryProposalRequest, QueryProposalResponse, QueryParamsRequest, QueryParamsResponse, MsgVote, VoteOption};
use test_tube::{fn_execute, fn_query, Account, RunnerExecuteResult, SigningAccount};
use test_tube_x::{fn_execute, fn_query, Account, RunnerExecuteResult, SigningAccount};

use test_tube::module::Module;
use test_tube::runner::Runner;
use test_tube_x::module::Module;
use test_tube_x::runner::Runner;

use crate::PersistenceTestApp;

Expand Down
8 changes: 4 additions & 4 deletions packages/persistence-test-tube/src/module/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
mod gov;

pub use test_tube::macros;
pub use test_tube::module::bank;
pub use test_tube::module::wasm;
pub use test_tube::module::Module;
pub use test_tube_x::macros;
pub use test_tube_x::module::bank;
pub use test_tube_x::module::wasm;
pub use test_tube_x::module::Module;

pub use bank::Bank;
pub use gov::Gov;
Expand Down
16 changes: 8 additions & 8 deletions packages/persistence-test-tube/src/runner/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use cosmwasm_std::{Coin, Timestamp};

use prost::Message;
use serde::de::DeserializeOwned;
use test_tube::account::SigningAccount;
use test_tube_x::account::SigningAccount;

use test_tube::runner::result::{RunnerExecuteResult, RunnerResult};
use test_tube::runner::Runner;
use test_tube::BaseApp;
use test_tube_x::runner::result::{RunnerExecuteResult, RunnerResult};
use test_tube_x::runner::Runner;
use test_tube_x::BaseApp;

const FEE_DENOM: &str = "uxprt";
const OSMO_ADDRESS_PREFIX: &str = "persistence";
Expand Down Expand Up @@ -154,10 +154,10 @@ mod tests {
use cosmwasm_std::{attr, coins, Coin};

use crate::runner::app::PersistenceTestApp;
use test_tube::account::{Account, FeeSetting};
use test_tube::module::Module;
use test_tube::{ExecuteResponse, Wasm, Bank};
use test_tube::{runner::*, RunnerError};
use test_tube_x::account::{Account, FeeSetting};
use test_tube_x::module::Module;
use test_tube_x::{ExecuteResponse, Wasm, Bank};
use test_tube_x::{runner::*, RunnerError};

#[test]
fn test_init_accounts() {
Expand Down
10 changes: 5 additions & 5 deletions packages/persistence-test-tube/src/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ mod tests {
use super::app::PersistenceTestApp;
use cosmwasm_std::{to_binary, BankMsg, Coin, CosmosMsg, Empty, Event, WasmMsg};
use cw1_whitelist::msg::{ExecuteMsg, InstantiateMsg};
use test_tube::account::Account;
use test_tube::runner::error::RunnerError::{ExecuteError, QueryError};
use test_tube::runner::result::RawResult;
use test_tube::runner::Runner;
use test_tube::{Module, RunnerExecuteResult};
use test_tube_x::account::Account;
use test_tube_x::runner::error::RunnerError::{ExecuteError, QueryError};
use test_tube_x::runner::result::RawResult;
use test_tube_x::runner::Runner;
use test_tube_x::{Module, RunnerExecuteResult};

#[derive(::prost::Message)]
struct AdhocRandomQueryRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
description = "library for building integration testing environments for cosmos-sdk chains in Rust"
edition = "2021"
license = "MIT OR Apache-2.0"
name = "test-tube"
repository = "https://github.com/osmosis-labs/test-tube"
version = "0.1.7"
name = "test-tube-x"
repository = "https://github.com/persistenceCore/test-tube"
version = "0.2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c4b4498

Please sign in to comment.