Skip to content

Commit

Permalink
[refactor] migrate test asset tests
Browse files Browse the repository at this point in the history
Signed-off-by: alexstroke <[email protected]>
  • Loading branch information
alexstroke authored and AlexStroke committed Nov 27, 2023
1 parent d05df36 commit f237477
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions client/tests/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pub use iroha_config::{
iroha::{Configuration, ConfigurationProxy},
};

mod add_account;
mod add_domain;
mod deprecated_add_account;
mod deprecated_add_domain;
mod asset;
mod asset_propagation;
mod burn_public_keys;
Expand Down
25 changes: 25 additions & 0 deletions client_cli/pytests/test/assets/test_transfer_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ def test_transfer_asset(
iroha.should(have.asset(
f'{GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name}#{GIVEN_currently_authorized_account.domain}#{GIVEN_new_one_existing_account}'))

@allure.label('sdk_test_id', 'exchange_asset_intermediary')
@allure.label('permission', 'intermediary_permission_required')
@pytest.mark.xfail(reason="TO DO")
def test_exchange_asset_through_intermediary(
GIVEN_new_one_existing_account,
GIVEN_intermediary_with_transfer_permission,
GIVEN_seller_account_with_btc,
GIVEN_buyer_account_with_eth):
# with allure.step(f'WHEN {GIVEN_intermediary_with_transfer_permission.name}'
# f'exchanges BTC from {GIVEN_seller_account_with_btc.name}'
# f'with ETH from {GIVEN_buyer_account_with_eth.name}'):
# client_cli.exchange_assets(
# intermediary_account=GIVEN_intermediary_with_transfer_permission,
# seller_account=GIVEN_seller_account_with_btc,
# buyer_account=GIVEN_buyer_account_with_eth,
# btc_quantity="1",
# eth_quantity="10")
#
# with allure.step(f'THEN {GIVEN_seller_account_with_btc.name} receives ETH '
# f'AND {GIVEN_buyer_account_with_eth.name} receives BTC'):
# iroha.should(have.asset(
# f'eth#{GIVEN_seller_account_with_btc.domain}', quantity="10"))
# iroha.should(have.asset(
# f'btc#{GIVEN_buyer_account_with_eth.domain}', quantity="1"))
assert 0

@allure.label('sdk_test_id', 'transfer_user_asset')
@allure.label('permission', 'can_transfer_user_asset')
Expand Down
2 changes: 1 addition & 1 deletion client_cli/pytests/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def GIVEN_existing_domain_with_uppercase_letter(

@pytest.fixture()
def GIVEN_new_one_existing_account(GIVEN_new_one_existing_domain, GIVEN_public_key):
"""Fixture to create and register an existing account."""
"""Fixture to create an account."""
name = fake_name()
account = Account(
name=name,
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "3.8"
services:
iroha0:
image: hyperledger/iroha2:stable
platform: linux/amd64
environment:
TORII_P2P_ADDR: iroha0:1337
TORII_API_URL: iroha0:8080
Expand All @@ -25,6 +26,7 @@ services:

iroha1:
image: hyperledger/iroha2:stable
platform: linux/amd64
environment:
TORII_P2P_ADDR: iroha1:1338
TORII_API_URL: iroha1:8081
Expand All @@ -46,6 +48,7 @@ services:

iroha2:
image: hyperledger/iroha2:stable
platform: linux/amd64
environment:
TORII_P2P_ADDR: iroha2:1339
TORII_API_URL: iroha2:8082
Expand All @@ -67,6 +70,7 @@ services:

iroha3:
image: hyperledger/iroha2:stable
platform: linux/amd64
environment:
TORII_P2P_ADDR: iroha3:1340
TORII_API_URL: iroha3:8083
Expand Down

0 comments on commit f237477

Please sign in to comment.