8000 Add unit test for addr.go by matoval · Pull Request #1105 · ansible/receptor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add unit test for addr.go #1105

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

Merged
merged 5 commits into from
Aug 2, 2024
Merged

Add unit test for addr.go #1105

merged 5 commits into from
Aug 2, 2024

Conversation

matoval
Copy link
Collaborator
@matoval matoval commented Aug 2, 2024

Add unit test for addr.go

Addr struct properties need to be public in order to create a test Addr struct outside of netceptor for this test.

Copy link
codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.98%. Comparing base (70156fd) to head (4419c27).
Report is 74 commits behind head on devel.

@@            Coverage Diff             @@
##            devel    #1105      +/-   ##
==========================================
+ Coverage   42.29%   42.98%   +0.68%     
==========================================
  Files          44       47       +3     
  Lines        6850     7436     +586     
==========================================
+ Hits         2897     3196     +299     
- Misses       3710     3998     +288     
+ Partials      243      242       -1     
Files with missing lines Coverage Δ
pkg/netceptor/addr.go 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

Components Coverage Δ
Go 42.44% <100.00%> (+0.15%) ⬆️
Receptorctl 49.31% <ø> (∅)

network string
node string
service string
NetworkStr string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this, can you quickly run through why the vars need to be exported please?

Copy link
Collaborator Author
@matoval matoval Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vars need to be exported in order for netceptor_test to create an Addr with set vars for this test. The vars need to be set so that Network() and String() return values

Copy link
sonarqubecloud bot commented Aug 2, 2024

Copy link
Contributor
@AaronH88 AaronH88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AaronH88 AaronH88 merged commit a8be816 into ansible:devel Aug 2, 2024
22 checks passed
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.

2 participants
0