Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robot test: use fee param of the endpoints #1253

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions api/test/robot_tests/cmd/cmd.robot
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ POST a Smart Contract
${data}= Create Dictionary
... walletNickname=${WALLET_NICKNAME}
... coins=3000000000
... fee=1000
${file}= Create Dictionary smartContract=${sc}
${response}= POST ${API_URL}/cmd/deploySC data=${data} files=${file} expected_status=any
Log To Console json response: ${response.json()} # Print the response content to the test log for debugging
Expand All @@ -34,6 +35,7 @@ POST /cmd/executeFunction sync
... name=event
... at=${DEPLOYED_SC_ADDR}
... args=${argument}
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand All @@ -47,6 +49,7 @@ POST /cmd/executeFunction sync without arguments
... name=test
... at=${DEPLOYED_SC_ADDR}
... args=
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand All @@ -63,7 +66,8 @@ POST /cmd/executeFunction async
... at=${DEPLOYED_SC_ADDR}
... args=${argument}
... async=${True}
${response}= POST
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
... expected_status=${STATUS_OK}
Expand All @@ -77,7 +81,7 @@ POST /cmd/executeFunction async

POST /cmd/deploySC with invalid datastore
${sc}= Get File For Streaming Upload ${CURDIR}/../../testSC/build/main-testSC.wasm
${data}= Create Dictionary walletNickname=${WALLET_NICKNAME} datastore=invalid
${data}= Create Dictionary walletNickname=${WALLET_NICKNAME} datastore=invalid fee=1000
${file}= Create Dictionary smartContract=${sc}
${response}= POST
... ${API_URL}/cmd/deploySC
Expand All @@ -94,6 +98,7 @@ POST /cmd/executeFunction with invalid address
... name=event
... at=invalid
... args=${argument}
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand All @@ -109,6 +114,7 @@ POST /cmd/executeFunction with invalid arguments
... name=event
... at=AS12YBWcNcmN8wugh8xTZiyt48JjHqrNtem96jiCoGEZFGZPUyei6
... args=invalid
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand All @@ -121,6 +127,7 @@ POST /cmd/executeFunction with invalid function name
... nickname=${WALLET_NICKNAME}
... name=invalid
... at=${DEPLOYED_SC_ADDR}
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand Down
2 changes: 2 additions & 0 deletions api/test/robot_tests/event_manager/keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Deploy testSC
${data}= Create Dictionary
... walletNickname=${WALLET_NICKNAME}
... coins=3000000000
... fee=1000
${file}= Create Dictionary smartContract=${sc}
${response}= POST ${API_URL}/cmd/deploySC data=${data} files=${file} expected_status=${STATUS_OK}
Should Contain ${response.json()['firstEvent']['data']} TestSC is deployed at :
Expand All @@ -40,6 +41,7 @@ Generate Event
... at=${DEPLOYED_SC_ADDR}
... args=${argument}
... stream=${False}
... fee=1000

${response}= POST
... ${API_URL}/cmd/executeFunction
Expand Down
1 change: 1 addition & 0 deletions api/test/robot_tests/web_on_chain/web_on_chain.robot
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ POST /cmd/executeFunction To remove the dns entry
... name=dns1_deleteEntryFromDNS
... at=${DNS}
... args=${argument}
... fee=1000
${response}= POST
... ${API_URL}/cmd/executeFunction
... json=${data}
Expand Down