[Testing (DUP)] Add /internal/testutil pkg & refactor mockdns test code#696
Merged
bryanchriswhite merged 4 commits intomainfrom Apr 21, 2023
Merged
[Testing (DUP)] Add /internal/testutil pkg & refactor mockdns test code#696bryanchriswhite merged 4 commits intomainfrom
bryanchriswhite merged 4 commits intomainfrom
Conversation
Olshansk
approved these changes
Apr 20, 2023
bryanchriswhite
added a commit
that referenced
this pull request
Apr 25, 2023
* pokt/main: [E2E] adds in-cluster config for E2E tests (#689) [Makefile] fixes the localnet_db_cli target (#700) Update devlog6.md [CLI] Remove logging for end user focused messages (#698) [Testing (DUP)] Add /internal/testutil pkg & refactor mockdns test code (#696) [Infra] Adapt pocket helm chart for DevNets (#682) Update changelog-verify.yml (#691)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Factors out some common mockdns usage, including a "noop" logger to things down (mockdns is noisy IMO).
(Duplicate of #685 🙄, I forgot to change the base branch before merging. As a result, the changes were squashed-merged into a different branch than main. Re-opening here, apologies for the extra noise. 🙏🙏)
Issue
Fixes #609
Type of change
Please mark the relevant option(s):
List of changes
/internaldirectory/interal/testutilpkgmockdnsusageTesting
go build -o ./pokt-node ./app/pocketnm ./pokt-node | grep prepareDNSResolverMockshould print nothingIf
prepareDNSResolverMockwas included in the build, it will be listed in the symbol table which we can print withnm. Double-check the function names match, a typo could result in a false positive. Additionally, one can build a test binary (go test -c -o <output bin path> [-run <test func name>] <pkg>) on a test pkg which is known to import a test util function and ensure that it is present in the symbol table, as a control.make develop_test; if any code changes were madeRequired Checklist
godocformat comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)