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

Refactor config/resolvers.go, update resolvers_test.go #814

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

VltraHeaven
Copy link
Collaborator

@VltraHeaven VltraHeaven commented Apr 27, 2022

Hello @caffix

  • Unit and benchmark tests added to config/resolvers_test.go to improve code coverage for methods in config/resolvers.go
  • Moved functionality of AddResolvers and AddResolver methods into SetResolvers
  • Moved functionality of AddTrustedResolvers and AddTrustedResolver methods into SetTrustedResolvers

- `BenchmarkTestConfigSetResolvers` added 
- Refactored testing functions in resolvers_test.go
- Moved functionality of AddResolvers and AddResolver methods into SetResolvers method
- Moved functionality of AddTrustedResolvers and AddTrustedResolver methods into SetTrustedResolvers method
- Modified where SetTrustedResolvers method calls AddResolvers, is now calling AddTrustedResolvers in it's place. 
- Additional tests for SetTrustedResolvers added to resolvers_test.go
@VltraHeaven
Copy link
Collaborator Author

Any recommendations for changes to this PR?

@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #814 (1abe612) into develop (e0e5c5c) will increase coverage by 0.66%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #814      +/-   ##
===========================================
+ Coverage    39.46%   40.12%   +0.66%     
===========================================
  Files           42       42              
  Lines         5307     5295      -12     
===========================================
+ Hits          2094     2124      +30     
+ Misses        3115     3070      -45     
- Partials        98      101       +3     
Impacted Files Coverage Δ
github.com/OWASP/Amass/config/scope.go 89.70% <0.00%> (-0.51%) ⬇️
github.com/OWASP/Amass/config/resolvers.go 76.82% <0.00%> (+49.66%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant