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

mandos test update #796

Merged
merged 4 commits into from
Nov 23, 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
2 changes: 1 addition & 1 deletion integrationTests/json/scenariosAdderLog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Clean: true

func TestRustAdderLog(t *testing.T) {
ScenariosTest(t).
Folder("adder/scenarios").
Folder("adder/scenarios/adder.scen.json").
WithExecutorLogs().
Run().
CheckNoError().
Expand Down
3 changes: 2 additions & 1 deletion integrationTests/json/scenariosContracts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestESDTMultiTransferOnCallback(t *testing.T) {

func TestCreateAsyncCall(t *testing.T) {
ScenariosTest(t).
Folder("features/composability/scenarios-promises").
Folder("features/composability/scenarios").
File("promises_single_transfer.scen.json").
Run().
CheckNoError()
Expand All @@ -60,6 +60,7 @@ func TestCreateAsyncCall(t *testing.T) {
func TestMultisig(t *testing.T) {
ScenariosTest(t).
Folder("multisig/scenarios").
Exclude("multisig/scenarios/interactor*").
Run().
CheckNoError()
}
Expand Down
6 changes: 4 additions & 2 deletions integrationTests/json/scenariosExecutorLogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func TestCreateAsyncCallLog(t *testing.T) {
}

expected := ScenariosTest(t).
Folder("features/composability/scenarios-promises").
Folder("features/composability/scenarios").
File("promises_single_transfer.scen.json").
WithExecutorFactory(wasmer.ExecutorFactory()).
WithExecutorLogs().
Expand All @@ -158,7 +158,7 @@ func TestCreateAsyncCallLog(t *testing.T) {
ExtractLog()

ScenariosTest(t).
Folder("features/composability/scenarios-promises").
Folder("features/composability/scenarios").
File("promises_single_transfer.scen.json").
WithExecutorFactory(wasmer2.ExecutorFactory()).
WithExecutorLogs().
Expand Down Expand Up @@ -198,6 +198,7 @@ func TestMultisigLog(t *testing.T) {

expected := ScenariosTest(t).
Folder("multisig/scenarios").
Exclude("multisig/scenarios/interactor*").
WithExecutorFactory(wasmer.ExecutorFactory()).
WithExecutorLogs().
Run().
Expand All @@ -206,6 +207,7 @@ func TestMultisigLog(t *testing.T) {

ScenariosTest(t).
Folder("multisig/scenarios").
Exclude("multisig/scenarios/interactor*").
WithExecutorFactory(wasmer2.ExecutorFactory()).
WithExecutorLogs().
Run().
Expand Down
8 changes: 1 addition & 7 deletions integrationTests/json/scenariosFeatures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestRustBasicFeaturesLatest(t *testing.T) {
ScenariosTest(t).
Folder("features/basic-features/scenarios").
Exclude("features/basic-features/scenarios/storage_mapper_fungible_token.scen.json").
Exclude("features/basic-features/scenarios/get_shard_of_address.scen.json").
Run().
CheckNoError()
}
Expand Down Expand Up @@ -90,13 +91,6 @@ func TestRustComposability(t *testing.T) {
CheckNoError()
}

func TestRustPromisesFeatures(t *testing.T) {
ScenariosTest(t).
Folder("features/composability/scenarios-promises").
Run().
CheckNoError()
}

func TestRustFormattedMessageFeatures(t *testing.T) {
ScenariosTest(t).
Folder("features/formatted-message-features/scenarios").
Expand Down
80 changes: 80 additions & 0 deletions test/adder/scenarios/interactor_trace.scen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"steps": [
{
"step": "setState",
"accounts": {
"0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60": {
"nonce": "481",
"balance": "106274669842530000003",
"esdt": {
"str:CAN-14dc0a": "1000",
"str:CAN-2abf4b": "1000",
"str:CAN-6d39e6": "1000",
"str:CAN-ac1592": "1000"
},
"username": ""
}
}
},
{
"step": "setState",
"newAddresses": [
{
"creatorAddress": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
"creatorNonce": "481",
"newAddress": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60"
}
]
},
{
"step": "scDeploy",
"id": "",
"tx": {
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
"contractCode": "file:../output/adder.wasm",
"arguments": [
"0x00"
],
"gasLimit": "70,000,000",
"gasPrice": ""
},
"expect": {
"status": "0"
}
},
{
"step": "scCall",
"id": "",
"tx": {
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
"to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60",
"function": "add",
"arguments": [
"0x07"
],
"gasLimit": "70,000,000",
"gasPrice": ""
},
"expect": {
"status": "0"
}
},
{
"step": "scCall",
"id": "",
"tx": {
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
"to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60",
"function": "add",
"arguments": [
"0x05"
],
"gasLimit": "70,000,000",
"gasPrice": ""
},
"expect": {
"status": "0"
}
}
]
}
Binary file modified test/crowdfunding-esdt/output/crowdfunding-esdt.wasm
Binary file not shown.
30 changes: 10 additions & 20 deletions test/crowdfunding-esdt/scenarios/_generated_fund.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,33 @@
"step": "setState",
"accounts": {
"0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": {
"nonce": "0",
"balance": "0",
"code": "file:../output/crowdfunding-esdt.wasm",
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925",
"developerRewards": "0"
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925"
}
}
},
Expand All @@ -54,7 +46,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand All @@ -75,7 +68,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand Down Expand Up @@ -110,22 +104,18 @@
"esdtValue": [
{
"tokenIdentifier": "str:CROWD-123456",
"nonce": "0",
"value": "1000"
}
],
"function": "fund",
"arguments": [],
"gasLimit": "9223372036854775807",
"gasLimit": "100,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "0",
"message": "str:",
"logs": "*",
"gas": "*",
"refund": "*"
"message": "str:"
}
}
]
Expand Down
22 changes: 8 additions & 14 deletions test/crowdfunding-esdt/scenarios/_generated_init.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,33 @@
"step": "setState",
"accounts": {
"0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": {
"nonce": "0",
"balance": "0",
"code": "file:../output/crowdfunding-esdt.wasm",
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925",
"developerRewards": "0"
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925"
}
}
},
Expand All @@ -54,7 +46,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand All @@ -75,7 +68,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand Down
27 changes: 9 additions & 18 deletions test/crowdfunding-esdt/scenarios/_generated_query_status.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,33 @@
"step": "setState",
"accounts": {
"0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": {
"nonce": "0",
"balance": "0",
"developerRewards": "0"
"balance": "0"
}
}
},
{
"step": "setState",
"accounts": {
"0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": {
"nonce": "0",
"balance": "0",
"code": "file:../output/crowdfunding-esdt.wasm",
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925",
"developerRewards": "0"
"owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925"
}
}
},
Expand All @@ -54,7 +46,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand All @@ -75,7 +68,8 @@
{
"nonce": "0",
"balance": "1000",
"royalties": "0"
"royalties": "0",
"attributes": "0x"
}
]
}
Expand Down Expand Up @@ -114,10 +108,7 @@
"0x"
],
"status": "0",
"message": "str:",
"logs": "*",
"gas": "*",
"refund": "*"
"message": "str:"
}
}
]
Expand Down
Loading
Loading