-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
integration: add test to check prune status #2043
integration: add test to check prune status #2043
Conversation
Adds a check to make sure that prune status on getblockchaininfo returns true for pruned nodes.
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 test, LGTM 🎉
integration/prune_test.go
Outdated
btcdCfg := []string{"--prune=1536"} | ||
r, err := rpctest.New(&chaincfg.SimNetParams, nil, btcdCfg, "") | ||
if err != nil { | ||
t.Fatal("unable to create primary harness: ", err) |
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.
Should we use the require
library for new code? Makes things more compact IMO.
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.
Addressed in a fixup
integration/prune_test.go
Outdated
if err := r.SetUp(false, 0); err != nil { | ||
t.Fatalf("unable to setup chain: %v", err) | ||
} | ||
defer r.TearDown() |
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.
Could use t.Cleanup()
.
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.
Addressed in a fixup
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 ✅
Adds a check to make sure that prune status on getblockchaininfo returns true for pruned nodes.