Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pause125 committed Jul 25, 2024
1 parent f248ac5 commit 2da6920
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions crates/testsuite/features/cmd.feature
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Feature: Rooch CLI integration tests
Scenario: event
Given a server for event
# event example and event prc
Then cmd: "move publish -p ../../examples/event --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/event --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::event_test::emit_event --args 10u64"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Expand All @@ -121,7 +121,7 @@ Feature: Rooch CLI integration tests
@serial
Scenario: indexer
Given a server for indexer
Then cmd: "move publish -p ../../examples/event --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/event --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::event_test::emit_event --args 10u64"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: Rooch CLI integration tests
@serial
Scenario: kv_store example
Given a server for kv_store
Then cmd: "move publish -p ../../examples/kv_store --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/kv_store --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::kv_store::add_value --args string:key1 --args string:value1"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Expand All @@ -183,7 +183,7 @@ Feature: Rooch CLI integration tests
Scenario: entry_function example
Given a server for entry_function

Then cmd: "move publish -p ../../examples/entry_function_arguments/ --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/entry_function_arguments/ --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::entry_function::emit_bool --args bool:true "
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Expand Down Expand Up @@ -217,7 +217,7 @@ Feature: Rooch CLI integration tests
Given a server for publish_through_move_action

# The counter example
Then cmd: "move publish -p ../../examples/counter --named-addresses rooch_examples=default --by-move-action"
Then cmd: "move publish -p ../../examples/counter --named-addresses rooch_examples=default --by-move-action --json"
Then assert: "'{{$.move[-1]}}' contains INVALID_MODULE_PUBLISHER"

Then stop the server
Expand All @@ -227,7 +227,7 @@ Feature: Rooch CLI integration tests
Given a server for publish_through_entry_function

# The counter example
Then cmd: "move publish -p ../../examples/counter --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/counter --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move view --function default::counter::value"
Then assert: "{{$.move[-1].return_values[0].decoded_value}} == 0"
Expand All @@ -238,17 +238,17 @@ Feature: Rooch CLI integration tests
Then assert: "{{$.resource[-1].decoded_value.value.value.value.value}} == 1"

# The entry_function_arguments example
Then cmd: "move publish -p ../../examples/entry_function_arguments_old/ --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/entry_function_arguments_old/ --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::entry_function::emit_mix --args 3u8 --args "vector<object_id>:0x2342,0x3132" "
Then assert: "'{{$.move[-1]}}' contains FUNCTION_RESOLUTION_FAILURE"
Then cmd: "move publish -p ../../examples/entry_function_arguments/ --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/entry_function_arguments/ --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::entry_function::emit_mix --args 3u8 --args "vector<object_id>:0x2342,0x3132" "
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"

# check compatibility
Then cmd: "move publish -p ../../examples/entry_function_arguments_old/ --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/entry_function_arguments_old/ --named-addresses rooch_examples=default --json"
Then assert: "'{{$.move[-1].execution_info.status.type}}' == 'moveabort'"

Then stop the server
Expand All @@ -257,7 +257,7 @@ Feature: Rooch CLI integration tests
Scenario: coins example
Given a server for coins
Then cmd: "account create --json"
Then cmd: "move publish -p ../../examples/coins --named-addresses coins=default"
Then cmd: "move publish -p ../../examples/coins --named-addresses coins=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move run --function default::fixed_supply_coin::faucet --args object:default::fixed_supply_coin::Treasury"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Expand All @@ -280,7 +280,7 @@ Feature: Rooch CLI integration tests
@serial
Scenario: Issue a coin through module_template
Given a server for issue_coin
Then cmd: "move publish -p ../../examples/module_template/ --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/module_template/ --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"

#TODO: uncomment this once move_module::binding_module_address is ready
Expand All @@ -301,7 +301,7 @@ Feature: Rooch CLI integration tests
Given a server for basic_object
Then cmd: "account create"
Then cmd: "account list --json"
Then cmd: "move publish -p ../../examples/basic_object --named-addresses basic_object=default"
Then cmd: "move publish -p ../../examples/basic_object --named-addresses basic_object=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"

#object pub transfer
Expand Down Expand Up @@ -351,7 +351,7 @@ Feature: Rooch CLI integration tests
Scenario: object display example
Given a server for object_display
Then cmd: "account create"
Then cmd: "move publish -p ../../examples/display --named-addresses display=default"
Then cmd: "move publish -p ../../examples/display --named-addresses display=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"

Then cmd: "move run --function default::display::create_object --sender default --args 'string:test_object' --args 'address:default' --args 'string:test object description'"
Expand Down Expand Up @@ -382,7 +382,7 @@ Feature: Rooch CLI integration tests
Given a server for wasm_test

# publish wasm execution
Then cmd: "move publish -p ../../examples/wasm_execution --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/wasm_execution --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"

# test wasm trap
Expand Down Expand Up @@ -432,7 +432,7 @@ Feature: Rooch CLI integration tests
Scenario: view_function_loop example
Given a server for view_function_loop
Then cmd: "account create"
Then cmd: "move publish -p ../../examples/view_function_loop --named-addresses rooch_examples=default"
Then cmd: "move publish -p ../../examples/view_function_loop --named-addresses rooch_examples=default --json"
Then assert: "{{$.move[-1].execution_info.status.type}} == executed"
Then cmd: "move view --function default::out_of_gas_loop::out_of_gas"
Then assert: "{{$.move[-1].vm_status.ExecutionFailure.status_code}} == 4002"

0 comments on commit 2da6920

Please sign in to comment.