insomniacslk / dhcp

DHCPv6 and DHCPv4 packet library, client and server written in Go
BSD 3-Clause "New" or "Revised" License
710 stars 169 forks source link

dhcpv4: add test for NewInform() with modifiers #480

Closed twelho closed 2 years ago

twelho commented 2 years ago

NewInform() exposes a consumer-facing interface that accepts modifiers, but this functionality is never tested unlike with for example NewRequest() and NewRenew(). To ensure that modifiers are correctly respected and any future modifications won't break this support, add a modifier test for NewInform().

codecov[bot] commented 2 years ago

Codecov Report

Base: 67.43% // Head: 67.51% // Increases project coverage by +0.07% :tada:

Coverage data is based on head (fd26ffd) compared to base (0fe08a6). Patch has no changes to coverable lines.

:exclamation: Current head fd26ffd differs from pull request most recent head 5293afb. Consider uploading reports for the commit 5293afb to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #480 +/- ## ========================================== + Coverage 67.43% 67.51% +0.07% ========================================== Files 90 90 Lines 3802 3799 -3 ========================================== + Hits 2564 2565 +1 + Misses 1061 1055 -6 - Partials 177 179 +2 ``` | Flag | Coverage Δ | | |---|---|---| | integtests | `∅ <ø> (∅)` | | | unittests | `67.51% <ø> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/insomniacslk/dhcp/pull/480?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac) | Coverage Δ | | |---|---|---| | [dhcpv4/nclient4/lease.go](https://codecov.io/gh/insomniacslk/dhcp/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac#diff-ZGhjcHY0L25jbGllbnQ0L2xlYXNlLmdv) | `46.15% <0.00%> (-5.58%)` | :arrow_down: | | [dhcpv4/dhcpv4.go](https://codecov.io/gh/insomniacslk/dhcp/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac#diff-ZGhjcHY0L2RoY3B2NC5nbw==) | `74.92% <0.00%> (+0.28%)` | :arrow_up: | | [dhcpv4/option\_ip.go](https://codecov.io/gh/insomniacslk/dhcp/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac#diff-ZGhjcHY0L29wdGlvbl9pcC5nbw==) | `73.33% <0.00%> (+20.00%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=insomniac)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.