From d9f9dfe754e09c3be1d75e769ca022ac188d8449 Mon Sep 17 00:00:00 2001 From: Omar Sy Date: Thu, 26 Dec 2024 21:48:54 +0100 Subject: [PATCH] test: update assert origin call test --- .../testdata/assertorigincall.txtar | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gno.land/pkg/integration/testdata/assertorigincall.txtar b/gno.land/pkg/integration/testdata/assertorigincall.txtar index 2c4a27f9d06..430d39a9a0e 100644 --- a/gno.land/pkg/integration/testdata/assertorigincall.txtar +++ b/gno.land/pkg/integration/testdata/assertorigincall.txtar @@ -3,7 +3,7 @@ # # | Num | Msg Type | Call from | Entry Point | Result | # |-----|:--------:|:-------------------:|:----------------------:|:------:| -# | 1 | MsgCall | wallet direct | myrealm.A() | PANIC | +# | 1 | MsgCall | wallet direct | myrealm.A() | pass | # | 2 | | | myrealm.B() | pass | # | 3 | | | myrealm.C() | pass | # | 4 | | through /r/foo | myrealm.A() | PANIC | @@ -12,17 +12,17 @@ # | 7 | | through /p/demo/bar | bar.A() | PANIC | # | 8 | | | bar.B() | pass | # | 9 | | | bar.C() | PANIC | -# | 10 | MsgRun | wallet direct | myrealm.A() | PANIC | +# | 10 | MsgRun | wallet direct | myrealm.A() | pass | # | 11 | | | myrealm.B() | pass | -# | 12 | | | myrealm.C() | PANIC | +# | 12 | | | myrealm.C() | pass | # | 13 | | through /r/foo | myrealm.A() | PANIC | # | 14 | | | myrealm.B() | pass | # | 15 | | | myrealm.C() | PANIC | -# | 16 | | through /p/demo/bar | bar.A() | PANIC | +# | 16 | | through /p/demo/bar | bar.A() | pass | # | 17 | | | bar.B() | pass | # | 18 | | | bar.C() | PANIC | # | 19 | MsgCall | wallet direct | std.AssertOriginCall() | pass | -# | 20 | MsgRun | wallet direct | std.AssertOriginCall() | PANIC | +# | 20 | MsgRun | wallet direct | std.AssertOriginCall() | pass | # Init ## set up and start a new node @@ -34,9 +34,9 @@ gnoland start # The PANIC is expected to fail at the transaction simulation stage, which is why we set gas-wanted to 1. # Test cases -## 1. MsgCall -> myrlm.A: PANIC -! gnokey maketx call -pkgpath gno.land/r/myrlm -func A -gas-fee 100000ugnot -gas-wanted 1 -broadcast -chainid tendermint_test test1 -stderr 'invalid non-origin call' +## 1. MsgCall -> myrlm.A: PASS +gnokey maketx call -pkgpath gno.land/r/myrlm -func A -gas-fee 100000ugnot -gas-wanted 1000000 -broadcast -chainid tendermint_test test1 +stdout 'OK!' ## 2. MsgCall -> myrlm.B: PASS gnokey maketx call -pkgpath gno.land/r/myrlm -func B -gas-fee 100000ugnot -gas-wanted 150000 -broadcast -chainid tendermint_test test1 @@ -71,17 +71,17 @@ stderr 'invalid non-origin call' ## ! gnokey maketx call -pkgpath gno.land/p/demo/bar -func C -gas-fee 100000ugnot -gas-wanted 5000000 -broadcast -chainid tendermint_test test1 ## stderr 'invalid non-origin call' -## 10. MsgRun -> run.main -> myrlm.A: PANIC -! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/myrlmA.gno -stderr 'invalid non-origin call' +## 10. MsgRun -> run.main -> myrlm.A: PASS +gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/myrlmA.gno +stdout 'OK!' ## 11. MsgRun -> run.main -> myrlm.B: PASS gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/myrlmB.gno stdout 'OK!' -## 12. MsgRun -> run.main -> myrlm.C: PANIC -! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/myrlmC.gno -stderr 'invalid non-origin call' +## 12. MsgRun -> run.main -> myrlm.C: PASS +## gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/myrlmC.gno +stdout 'OK!' ## 13. MsgRun -> run.main -> foo.A: PANIC ! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/fooA.gno @@ -95,26 +95,26 @@ stdout 'OK!' ! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/fooC.gno stderr 'invalid non-origin call' -## 16. MsgRun -> run.main -> bar.A: PANIC -! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/barA.gno -stderr 'invalid non-origin call' +## 16. MsgRun -> run.main -> bar.A: PASS +gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/barA.gno +stdout 'OK!' ## 17. MsgRun -> run.main -> bar.B: PASS gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/barB.gno stdout 'OK!' -## 18. MsgRun -> run.main -> bar.C: PANIC -! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 5500000 -broadcast -chainid tendermint_test test1 $WORK/run/barC.gno -stderr 'invalid non-origin call' +## 18. MsgRun -> run.main -> bar.C: PASS +gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/barC.gno +stdout 'OK!' ## remove testcase 19 due to maketx call forced to call a realm -## 19. MsgCall -> std.AssertOriginCall: pass +## 19. MsgCall -> std.AssertOriginCall: PASS ## gnokey maketx call -pkgpath std -func AssertOriginCall -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 ## stdout 'OK!' -## 20. MsgRun -> std.AssertOriginCall: PANIC -! gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/baz.gno -stderr 'invalid non-origin call' +## 20. MsgRun -> std.AssertOriginCall: PASS +gnokey maketx run -gas-fee 100000ugnot -gas-wanted 10000000 -broadcast -chainid tendermint_test test1 $WORK/run/baz.gno +stdout 'OK!' -- r/myrlm/rlm.gno --