@@ -190,7 +190,7 @@ async fn init_ctx<'a>() -> Arc<TestContext<cosmos::Module, evm::Module<'a>>> {
190190 } ;
191191 let src = cosmos:: Module :: new ( cosmos_cfg) . await . unwrap ( ) ;
192192 let dst = evm:: Module :: new ( evm_cfg) . await . unwrap ( ) ;
193- let needed_channel_count = 1 ; // TODO: Hardcoded now, it will be specified from config later.
193+ let needed_channel_count = 19 ; // TODO: Hardcoded now, it will be specified from config later.
194194
195195 // TODO(aeryz): move config file into the testing framework's own config file
196196 let ctx = TestContext :: new (
@@ -444,15 +444,10 @@ async fn test_send_vault_success_with_fee() {
444444 let ( cosmos_address, cosmos_provider) = ctx. src . get_signer ( ) . await ;
445445 let cosmos_address_bytes = cosmos_address. to_string ( ) . into_bytes ( ) ;
446446
447- // ensure_channels_opened(ctx.channel_count).await;
448- // let available_channel = ctx.get_available_channel_count().await;
449- // assert!(available_channel > 0);
450- // let pair = ctx.get_channel().await.expect("channel available");
451-
452- let pair = channel_provider:: ChannelPair {
453- src : 1u32 ,
454- dest : 1u32 ,
455- } ;
447+ ensure_channels_opened ( ctx. channel_count ) . await ;
448+ let available_channel = ctx. get_available_channel_count ( ) . await ;
449+ assert ! ( available_channel > 0 ) ;
450+ let pair = ctx. get_channel ( ) . await . expect ( "channel available" ) ;
456451
457452 let dst_channel_id = pair. dest ;
458453 let src_channel_id = pair. src ;
@@ -3809,103 +3804,103 @@ async fn test_send_vault_unhappy_u_fool() {
38093804 ) ;
38103805}
38113806
3812- // #[tokio::test]
3813- // async fn send_stake_and_unstake_from_evm_to_union0() {
3814- // self::test_stake_and_unstake_from_evm_to_union().await;
3815- // }
3816-
3817- // #[tokio::test]
3818- // async fn send_stake_unstake_and_withdraw_from_evm_to_union0() {
3819- // self::test_stake_unstake_and_withdraw_from_evm_to_union().await;
3820- // }
3821-
3822- // #[tokio::test]
3823- // async fn from_evm_to_union0() {
3824- // self::test_send_packet_from_evm_to_union_and_send_back_unwrap().await;
3825- // }
3826-
3827- // #[tokio::test]
3828- // async fn from_evm_to_union_refund() {
3829- // self::test_send_packet_from_evm_to_union_get_refund().await;
3830- // }
3831-
3832- // #[tokio::test] // Note: For this one to work; timeout plugin should be enabled on voyager.
3833- // async fn from_union_to_evm_refund() {
3834- // self::test_send_packet_from_union_to_evm_get_refund().await;
3835- // }
3836-
3837- // #[tokio::test]
3838- // async fn from_union_to_evm0() {
3839- // self::test_send_packet_from_union_to_evm_and_send_back_unwrap().await;
3840- // }
3841-
3842- // #[tokio::test]
3843- // async fn from_evm_to_union_stake0() {
3844- // self::test_stake_from_evm_to_union().await;
3845- // }
3846-
3847- // #[tokio::test]
3848- // async fn from_evm_to_union_stake_and_refund() {
3849- // self::test_stake_from_evm_to_union_and_refund().await;
3850- // }
3851-
3852- // #[tokio::test]
3853- // async fn test_vault_works() {
3854- // self::test_send_vault_success().await;
3855- // }
3807+ #[ tokio:: test]
3808+ async fn send_stake_and_unstake_from_evm_to_union0 ( ) {
3809+ self :: test_stake_and_unstake_from_evm_to_union ( ) . await ;
3810+ }
3811+
3812+ #[ tokio:: test]
3813+ async fn send_stake_unstake_and_withdraw_from_evm_to_union0 ( ) {
3814+ self :: test_stake_unstake_and_withdraw_from_evm_to_union ( ) . await ;
3815+ }
3816+
3817+ #[ tokio:: test]
3818+ async fn from_evm_to_union0 ( ) {
3819+ self :: test_send_packet_from_evm_to_union_and_send_back_unwrap ( ) . await ;
3820+ }
3821+
3822+ #[ tokio:: test]
3823+ async fn from_evm_to_union_refund ( ) {
3824+ self :: test_send_packet_from_evm_to_union_get_refund ( ) . await ;
3825+ }
3826+
3827+ #[ tokio:: test] // Note: For this one to work; timeout plugin should be enabled on voyager.
3828+ async fn from_union_to_evm_refund ( ) {
3829+ self :: test_send_packet_from_union_to_evm_get_refund ( ) . await ;
3830+ }
3831+
3832+ #[ tokio:: test]
3833+ async fn from_union_to_evm0 ( ) {
3834+ self :: test_send_packet_from_union_to_evm_and_send_back_unwrap ( ) . await ;
3835+ }
3836+
3837+ #[ tokio:: test]
3838+ async fn from_evm_to_union_stake0 ( ) {
3839+ self :: test_stake_from_evm_to_union ( ) . await ;
3840+ }
3841+
3842+ #[ tokio:: test]
3843+ async fn from_evm_to_union_stake_and_refund ( ) {
3844+ self :: test_stake_from_evm_to_union_and_refund ( ) . await ;
3845+ }
3846+
3847+ #[ tokio:: test]
3848+ async fn test_vault_works ( ) {
3849+ self :: test_send_vault_success ( ) . await ;
3850+ }
38563851
38573852#[ tokio:: test]
38583853async fn test_vault_works_with_fee ( ) {
38593854 self :: test_send_vault_success_with_fee ( ) . await ;
38603855}
38613856
3862- // // UNHAPPY PATHS
3863- // #[tokio::test]
3864- // async fn from_evm_to_union_tokenv2_unhappy_path() {
3865- // self::test_from_evm_to_union_tokenv2_unhappy_only_maker_err().await;
3866- // }
3867-
3868- // #[tokio::test]
3869- // async fn from_evm_to_union_tokenv2_unhappy_path2() {
3870- // self::test_from_evm_to_union_tokenv2_unhappy_errchannelgovernancetokennotset().await;
3871- // }
3872-
3873- // #[tokio::test]
3874- // async fn from_evm_to_union_tokenv2_unhappy_path3() {
3875- // self::test_from_evm_to_union_tokenv2_unhappy_erc20_insufficient_balance().await;
3876- // }
3877-
3878- // #[tokio::test]
3879- // async fn from_evm_to_union_tokenv2_unhappy_path4() {
3880- // self::test_from_evm_to_union_tokenv2_unhappy_err_invalid_unescrow().await;
3881- // }
3882-
3883- // #[tokio::test]
3884- // async fn from_evm_to_union_tokenv2_unhappy_path5() {
3885- // self::test_from_evm_to_union_tokenv2_unhappy_err_cannot_deploy().await;
3886- // }
3887-
3888- // #[tokio::test]
3889- // async fn from_evm_to_union_tokenv2_unhappy_path6() {
3890- // self::test_from_evm_to_union_batch_err_invalid_batch_instruction().await;
3891- // }
3892-
3893- // #[tokio::test]
3894- // async fn from_evm_to_union_tokenv2_unhappy_path7() {
3895- // self::test_from_evm_to_union_batch_err_invalid_forward_instruction().await;
3896- // }
3897-
3898- // #[tokio::test]
3899- // async fn test_send_vault_unhappy_path1() {
3900- // self::test_send_vault_unhappy_u_counterparty_is_not_fungible().await;
3901- // }
3902-
3903- // #[tokio::test]
3904- // async fn test_send_vault_unhappy_path2() {
3905- // self::test_send_vault_unhappy_u_fool().await;
3906- // }
3907-
3908- // #[tokio::test]
3909- // async fn test_send_vault_unhappy_path3() {
3910- // self::test_send_vault_unhappy_u_base_amount_must_cover_quote_amount().await;
3911- // }
3857+ // UNHAPPY PATHS
3858+ #[ tokio:: test]
3859+ async fn from_evm_to_union_tokenv2_unhappy_path ( ) {
3860+ self :: test_from_evm_to_union_tokenv2_unhappy_only_maker_err ( ) . await ;
3861+ }
3862+
3863+ #[ tokio:: test]
3864+ async fn from_evm_to_union_tokenv2_unhappy_path2 ( ) {
3865+ self :: test_from_evm_to_union_tokenv2_unhappy_errchannelgovernancetokennotset ( ) . await ;
3866+ }
3867+
3868+ #[ tokio:: test]
3869+ async fn from_evm_to_union_tokenv2_unhappy_path3 ( ) {
3870+ self :: test_from_evm_to_union_tokenv2_unhappy_erc20_insufficient_balance ( ) . await ;
3871+ }
3872+
3873+ #[ tokio:: test]
3874+ async fn from_evm_to_union_tokenv2_unhappy_path4 ( ) {
3875+ self :: test_from_evm_to_union_tokenv2_unhappy_err_invalid_unescrow ( ) . await ;
3876+ }
3877+
3878+ #[ tokio:: test]
3879+ async fn from_evm_to_union_tokenv2_unhappy_path5 ( ) {
3880+ self :: test_from_evm_to_union_tokenv2_unhappy_err_cannot_deploy ( ) . await ;
3881+ }
3882+
3883+ #[ tokio:: test]
3884+ async fn from_evm_to_union_tokenv2_unhappy_path6 ( ) {
3885+ self :: test_from_evm_to_union_batch_err_invalid_batch_instruction ( ) . await ;
3886+ }
3887+
3888+ #[ tokio:: test]
3889+ async fn from_evm_to_union_tokenv2_unhappy_path7 ( ) {
3890+ self :: test_from_evm_to_union_batch_err_invalid_forward_instruction ( ) . await ;
3891+ }
3892+
3893+ #[ tokio:: test]
3894+ async fn test_send_vault_unhappy_path1 ( ) {
3895+ self :: test_send_vault_unhappy_u_counterparty_is_not_fungible ( ) . await ;
3896+ }
3897+
3898+ #[ tokio:: test]
3899+ async fn test_send_vault_unhappy_path2 ( ) {
3900+ self :: test_send_vault_unhappy_u_fool ( ) . await ;
3901+ }
3902+
3903+ #[ tokio:: test]
3904+ async fn test_send_vault_unhappy_path3 ( ) {
3905+ self :: test_send_vault_unhappy_u_base_amount_must_cover_quote_amount ( ) . await ;
3906+ }
0 commit comments