Skip to content

Commit

Permalink
test(gnoland): test content mismatch for addpkg.txtar (#2766)
Browse files Browse the repository at this point in the history
Updated the test content in `addpkg.txtar` test file to correctly align
with its intended purpose. The test now reflects an addpkg scenario
instead of only test call

<!-- please provide a detailed description of the changes made in this
pull request. -->

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
linhpn99 committed Sep 12, 2024
1 parent d7407f5 commit 974dc43
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions gno.land/cmd/gnoland/testdata/addpkg.txtar
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# test for add package

# load hello.gno package located in $WORK directory as gno.land/r/hello
loadpkg gno.land/r/hello $WORK

## start a new node
gnoland start

## execute SayHello
gnokey maketx call -pkgpath gno.land/r/hello -func SayHello -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test test1
## deploy realm
gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/$USER_ADDR_test1/hello -gas-fee 1000000ugnot -gas-wanted 100000000 -broadcast -chainid=tendermint_test test1

## check output
stdout OK!
stdout 'GAS WANTED: 100000000'
stdout 'GAS USED: \d+'
stdout 'HEIGHT: \d+'
stdout 'EVENTS: \[\]'
stdout 'TX HASH: '

## call added realm
gnokey maketx call -pkgpath gno.land/r/$USER_ADDR_test1/hello -chainid=tendermint_test -func SayHello -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast test1

## compare SayHello
## check output
stdout '\("hello world!" string\)'
stdout OK!
stdout 'GAS WANTED: 2000000'
Expand Down

0 comments on commit 974dc43

Please sign in to comment.