-
Notifications
You must be signed in to change notification settings - Fork 253
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
test: integration test x/mint
#1791
Conversation
…e minimum 10 day blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besides testing for the year thing, it's very likely overkill, but we might also want to test that the funds are actually going where we think they are, so querying for the validator account (named "validator" in the keyring) which has some stake already delegated (or creating a new account and staking), and then looking at the module account that holds the community funds
Co-authored-by: Evan Forbes <42654277+evan-forbes@users.noreply.github.com>
--- FAIL: TestIntegrationTestSuite/TestTotalSupplyIncreasesOverTime (1.00s) /Users/rootulp/git/rootulp/celestia/celestia-app/x/mint/test/suite.go:87: test panicked: runtime error: invalid memory address or nil pointer dereference goroutine 2012 [running]: runtime/debug.Stack() /opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/debug/stack.go:24 +0x64 github.com/stretchr/testify/suite.failOnPanic(0x140047a96c0, {0x104a639a0, 0x105ecebd0}) /Users/rootulp/go/pkg/mod/github.com/stretchr/testify@v1.8.2/suite/suite.go:87 +0x34 github.com/stretchr/testify/suite.Run.func1.1() /Users/rootulp/go/pkg/mod/github.com/stretchr/testify@v1.8.2/suite/suite.go:183 +0x1f4 panic({0x104a639a0, 0x105ecebd0}) /opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/panic.go:884 +0x204 github.com/celestiaorg/celestia-app/x/mint/test.(*IntegrationTestSuite).GetTotalSupply(0x140001c1900, 0x0?) /Users/rootulp/git/rootulp/celestia/celestia-app/x/mint/test/mint_test.go:106 +0xdc github.com/celestiaorg/celestia-app/x/mint/test.(*IntegrationTestSuite).TestTotalSupplyIncreasesOverTime(0x140001c1900) /Users/rootulp/git/rootulp/celestia/celestia-app/x/mint/test/mint_test.go:62 +0x68 reflect.Value.call({0x14000df8ac0?, 0x14000d2c928?, 0x140044e2d01?}, {0x103e6a8b7, 0x4}, {0x14000db8e68, 0x1, 0x103e393f0?}) /opt/homebrew/Cellar/go/1.20.4/libexec/src/reflect/value.go:586 +0x87c reflect.Value.Call({0x14000df8ac0?, 0x14000d2c928?, 0x140001c1900?}, {0x14000db8e68?, 0x1052e1d48?, 0x3d?}) /opt/homebrew/Cellar/go/1.20.4/libexec/src/reflect/value.go:370 +0x90 github.com/stretchr/testify/suite.Run.func1(0x140047a96c0) /Users/rootulp/go/pkg/mod/github.com/stretchr/testify@v1.8.2/suite/suite.go:197 +0x3f0 testing.tRunner(0x140047a96c0, 0x14004bbed80) /opt/homebrew/Cellar/go/1.20.4/libexec/src/testing/testing.go:1576 +0x10c created by testing.(*T).Run /opt/homebrew/Cellar/go/1.20.4/libexec/src/testing/testing.go:1629 +0x368 /Users/rootulp/git/rootulp/celestia/celestia-app/x/mint/test/full_node.go:226: tearing down testnode
This reverts commit ee4e3b4.
timestamps don't appear to be advancing by 10 days per block: latestTimestamp 2023-05-24 16:25:25.810474 -0400 EDT latestTimestamp 2023-05-24 16:25:27.009179 -0400 EDT latestTimestamp 2023-05-24 16:25:27.906415 -0400 EDT latestTimestamp 2023-05-24 16:25:28.804406 -0400 EDT latestTimestamp 2023-05-24 16:25:29.713275 -0400 EDT latestTimestamp 2023-05-24 16:25:30.910224 -0400 EDT latestTimestamp 2023-05-24 16:25:31.804267 -0400 EDT latestTimestamp 2023-05-24 16:25:33.028104 -0400 EDT latestTimestamp 2023-05-24 16:25:33.917395 -0400 EDT latestTimestamp 2023-05-24 16:25:34.807346 -0400 EDT latestTimestamp 2023-05-24 16:25:36.011127 -0400 EDT latestTimestamp 2023-05-24 16:25:36.910078 -0400 EDT latestTimestamp 2023-05-24 16:25:37.805972 -0400 EDT latestTimestamp 2023-05-24 16:25:39.009305 -0400 EDT latestTimestamp 2023-05-24 16:25:39.907823 -0400 EDT latestTimestamp 2023-05-24 16:25:40.811224 -0400 EDT latestTimestamp 2023-05-24 16:25:42.007382 -0400 EDT latestTimestamp 2023-05-24 16:25:42.913254 -0400 EDT latestTimestamp 2023-05-24 16:25:43.806334 -0400 EDT latestTimestamp 2023-05-24 16:25:44.708312 -0400 EDT
Codecov Report
@@ Coverage Diff @@
## main #1791 +/- ##
==========================================
- Coverage 21.82% 21.80% -0.03%
==========================================
Files 116 117 +1
Lines 13247 13306 +59
==========================================
+ Hits 2891 2901 +10
- Misses 10065 10114 +49
Partials 291 291
|
initial supply: 100000001145805461utia initial timestamp: 100000001145805461utia wantAsFloat: 8 latestTimestamp 2023-05-27 22:51:42.033432 +0000 UTC later supply: 100000001449542529utia later timestamp: 2023-05-27 22:51:42.033432 +0000 UTC wantAsFloat: 7.2 latestTimestamp 2023-05-27 22:51:42.935906 +0000 UTC latestTimestamp 2023-05-27 22:51:43.838663 +0000 UTC latestTimestamp 2023-05-27 22:51:45.03145 +0000 UTC latestTimestamp 2023-05-27 22:51:45.93342 +0000 UTC latestTimestamp 2023-05-27 22:51:46.835305 +0000 UTC latestTimestamp 2023-05-27 22:51:48.037924 +0000 UTC latestTimestamp 2023-05-27 22:51:48.934952 +0000 UTC latestTimestamp 2023-05-27 22:51:49.837673 +0000 UTC latestTimestamp 2023-05-27 22:51:51.03862 +0000 UTC latestTimestamp 2023-05-27 22:51:51.934761 +0000 UTC latestTimestamp 2023-05-27 22:51:52.832512 +0000 UTC latestTimestamp 2023-05-27 22:51:54.041073 +0000 UTC latestTimestamp 2023-05-27 22:51:54.938937 +0000 UTC latestTimestamp 2023-05-27 22:51:55.834115 +0000 UTC latestTimestamp 2023-05-27 22:51:57.036927 +0000 UTC latestTimestamp 2023-05-27 22:51:57.937073 +0000 UTC latestTimestamp 2023-05-27 22:51:58.837436 +0000 UTC latestTimestamp 2023-05-27 22:52:00.044855 +0000 UTC latestTimestamp 2023-05-27 22:52:00.93712 +0000 UTC latestTimestamp 2023-05-27 22:52:01.841579 +0000 UTC
wantAsFloat: 8 inflationRate 0.081714102022966438 startTimestamp 2024-05-28 09:08:16.58339 +0000 UTC, endTimestamp: 2025-05-28 14:57:28.58339 +0000 UTC startHeight: 38, endHeight: 75 wantAsFloat: 7.2 inflationRate 0.075374835778984813
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Few comments, but nothing blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, no blocking comments or really that much more than the initial review!
Co-authored-by: Evan Forbes <42654277+evan-forbes@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apruuve 👍
Closes #1790