Skip to content

Commit

Permalink
fix query param of integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pause125 committed May 21, 2024
1 parent 4de7135 commit 634e778
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/testsuite/features/cmd.feature
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,26 @@ Feature: Rooch CLI integration tests
# because the indexer is async update, so sleep 5 seconds to wait indexer update.
Then sleep: "5"

Then cmd: "rpc request --method rooch_queryTransactions --params '[{"tx_order_range":{"from_order":0,"to_order":2}}, null, "1", true]'"
Then cmd: "rpc request --method rooch_queryTransactions --params '[{"tx_order_range":{"from_order":0,"to_order":2}}, null, "1", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].data[0].transaction.sequence_info.tx_order}} == 1"
Then assert: "{{$.rpc[-1].next_cursor}} == 1"
Then assert: "{{$.rpc[-1].has_next_page}} == true"
Then cmd: "rpc request --method rooch_queryTransactions --params '[{"tx_order_range":{"from_order":0,"to_order":2}}, "1", "1", true]'"
Then cmd: "rpc request --method rooch_queryTransactions --params '[{"tx_order_range":{"from_order":0,"to_order":2}}, "1", "1", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].data[0].transaction.sequence_info.tx_order}} == 0"
Then assert: "{{$.rpc[-1].next_cursor}} == 0"
Then assert: "{{$.rpc[-1].has_next_page}} == false"
Then cmd: "rpc request --method rooch_queryEvents --params '[{"tx_order_range":{"from_order":0, "to_order":2}}, null, "10", true]'"
Then cmd: "rpc request --method rooch_queryEvents --params '[{"tx_order_range":{"from_order":0, "to_order":2}}, null, "10", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].data[0].indexer_event_id.tx_order}} == 1"
Then assert: "{{$.rpc[-1].next_cursor.tx_order}} == 0"
Then assert: "{{$.rpc[-1].has_next_page}} == false"

# Sync states
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x3::coin::CoinInfo"}, null, "10", true]'"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x3::coin::CoinInfo"}, null, "10", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].data[0].tx_order}} == 0"
Then assert: "{{$.rpc[-1].data[0].object_type}} == 0x3::coin::CoinInfo"
Then assert: "{{$.rpc[-1].has_next_page}} == false"

Then cmd: "rpc request --method rooch_queryFieldStates --params '[{"object_id":"0x3"}, null, "10", true]'"
Then cmd: "rpc request --method rooch_queryFieldStates --params '[{"object_id":"0x3"}, null, "10", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].has_next_page}} == false"

# Then cmd: "rpc request --method rooch_syncStates --params '[null, null, "2", false]'"
Expand Down Expand Up @@ -288,7 +288,7 @@ Feature: Rooch CLI integration tests
# because the indexer is async update, so sleep 2 seconds to wait indexer update.
Then sleep: "2"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"{{$.address_mapping.default}}::child_object::Child"}, null, "10", true]'"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"{{$.address_mapping.default}}::child_object::Child"}, null, "10", {"descending": true,"showDisplay":false}]'"
Then assert: "{{$.rpc[-1].data[0].object_id}} == {{$.event[-1].data[0].decoded_event_data.value.id}}"
Then cmd: "move run --function default::third_party_module_for_child_object::update_child_age --args object:{{$.event[-1].data[0].decoded_event_data.value.id}} --args u64:10"
Expand Down Expand Up @@ -321,8 +321,8 @@ Feature: Rooch CLI integration tests
Then assert: "{{$.wallet[-1].total}} == 5000000000"
# query utxos and inscriptions
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x4::utxo::UTXO"}, null, "2", true]'"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x4::ord::Inscription"}, null, "2", true]'"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x4::utxo::UTXO"}, null, "2", {"descending": true,"showDisplay":false}]'"
Then cmd: "rpc request --method rooch_queryObjectStates --params '[{"object_type":"0x4::ord::Inscription"}, null, "2", {"descending": true,"showDisplay":false}]'"
# release servers
Then stop the server
Expand Down

0 comments on commit 634e778

Please sign in to comment.