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

chore: try to automate bug in gnolang/gnochess#97 #1172

Closed
wants to merge 75 commits into from

Conversation

moul
Copy link
Member

@moul moul commented Sep 25, 2023

Success! Integration test demonstrating this bug: gnokey error: unexpected object with id 0f4e03c94c94f711cb9b4a049a6517e886b3bc42:4.

Interesting file: https://github.com/moul/gno/blob/746eb1be13d479eba98d5992e9efafb943e97799/gno.land/cmd/gnoland/testdata/bug-gnochess-97.txtar.

Depends on #1171.

cc @thehowl.

$ go test -v . -run TestTestdata/bug-gnochess-97
=== RUN   TestTestdata
=== RUN   TestTestdata/bug-gnochess-97
=== PAUSE TestTestdata/bug-gnochess-97
=== CONT  TestTestdata/bug-gnochess-97
    testscript.go:534: WORK=$WORK
        PATH=/nix/store/xl220d87dlnq05kiz1pjqa9snhlvr1rs-go-1.20.8/share/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/moul/bin:/Users/moul/.nix-profile/bin:/etc/profiles/per-user/moul/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/Users/moul/.local/bin:/Users/moul/.local/share/node_modules/bin:/Users/moul/go/bin:/Users/moul/.local/share/rust/cargo/bin:/Users/moul/.local/share/rust/rustup/bin:/Users/moul/.config/zsh/plugins/p10k-config
        GOTRACEBACK=system
        HOME=/no-home
        TMPDIR=$WORK/.tmp
        devnull=/dev/null
        /=/
        :=:
        $=$
        GOCOVERDIR=
        exe=
        USER_SEED_test1=source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
        USER_ADDR_test1=g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5
        GNOROOT=/Users/moul/go/src/github.com/gnolang/gno
        GNOHOME=/var/folders/22/d9yt75bd2wv9sl3dm_lx85x80000gn/T/TestTestdata675128976/001/gno
        
        # test for https://github.com/gnolang/gnochess/issues/97
        ## start a new node (3.708s)
        > gnoland start
        > gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/demo/bug97 -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1
        [stdout]
        
        OK!
        GAS WANTED: 2000000
        GAS USED:   227880
        
        [stderr]
        Enter password.
        
        > gnokey maketx call -pkgpath 'gno.land/r/demo/bug97' -func 'RealmCall1' -gas-fee 1000000ugnot -gas-wanted 2000000 -send '' -broadcast -chainid='tendermint_test' test1
        [stdout]
        
        OK!
        GAS WANTED: 2000000
        GAS USED:   163885
        
        [stderr]
        Enter password.
        
        > stdout 'OK!'
        > gnokey maketx call -pkgpath 'gno.land/r/demo/bug97' -func 'RealmCall2' -gas-fee 1000000ugnot -gas-wanted 2000000 -send '' -broadcast -chainid='tendermint_test' test1
        [stdout]
        
        OK!
        GAS WANTED: 2000000
        GAS USED:   172646
        
        [stderr]
        Enter password.
        
        > stdout 'OK!'
        > gnokey maketx call -pkgpath 'gno.land/r/demo/bug97' -func 'RealmCall1' -gas-fee 1000000ugnot -gas-wanted 2000000 -send '' -broadcast -chainid='tendermint_test' test1
        gnokey error: unexpected object with id 0f4e03c94c94f711cb9b4a049a6517e886b3bc42:4
        [stderr]
        Enter password.
        
        FAIL: testdata/bug-gnochess-97.txtar:14: unexpected gnokey command failure
        
--- FAIL: TestTestdata (0.02s)
    --- FAIL: TestTestdata/bug-gnochess-97 (4.08s)
FAIL
FAIL	github.com/gnolang/gno/gno.land/cmd/gnoland	4.143s
FAIL

thehowl and others added 30 commits May 30, 2023 16:49
Because now AssertOriginCall works properly, filetest can't be a realm,
they must a non realm package like 'main'
thehowl and others added 14 commits September 18, 2023 19:44
** as requested, this is a squash of the following commits:
- feat: use commands.IO
- chore: cleanup gnoland output using context logger
- chore: cleanup integration test
- chore: cleanup
- feat: add test data example
- chore: cleanup
- fix: concurent run of gnoland
- chore: cleanup
- fix: cleanup
- fix: docker integration test
- chore: cleanup root dir and validate config
- fix: correctly update command io argument
- chore: cleanup

Signed-off-by: gfanton <[email protected]>
@moul moul self-assigned this Sep 25, 2023
@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Sep 25, 2023
@moul moul changed the title dev/moul/bug gnochess 97 chore: try to automate bug in gnolang/gnochess#97 Sep 25, 2023
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
@thehowl
Copy link
Member

thehowl commented Jan 31, 2024

The test is now passing on master.

I'll close this PR and make a new one to add the txtar test as a regression test :)

@thehowl thehowl closed this Jan 31, 2024
thehowl added a commit that referenced this pull request Feb 1, 2024
From #1172, pushed to current codebase.

Co-authored-by: Manfred Touron <[email protected]>
leohhhn pushed a commit to leohhhn/gno that referenced this pull request Feb 2, 2024
From gnolang#1172, pushed to current codebase.

Co-authored-by: Manfred Touron <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: ✅ Done
Status: 🌟 Wanted for Launch
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants