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

internal/getproviders: Tests for MultiSource #24576

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

apparentlymart
Copy link
Contributor

Due to other pressures at the time this was implemented, it was tested only indirectly through integration tests in other packages. This now introduces tests for the two main entry points on MultiSource, along with its provider-address pattern matching logic.

This does not yet include thorough tests for ParseMultiSourceMatchingPatterns, because that function still needs some adjustments to do the same case folding as for normal provider address parsing, which will follow in a latter commit along with suitable tests.

With that said, the tests added here do indirectly test the happy path of ParseMultiSourceMatchingPatterns, so we do have some incomplete testing of that function in the meantime.

Due to other pressures at the time this was implemented, it was tested
only indirectly through integration tests in other packages.

This now introduces tests for the two main entry points on the
MultiSource, along with its provider-address pattern matching logic.

This does not yet include thorough tests for
ParseMultiSourceMatchingPatterns, because that function still needs some
adjustments to do the same case folding as for normal provider address
parsing, which will follow in a latter commit along with suitable tests.

With that said, the tests added here do _indirectly_ test the happy path
of ParseMultiSourceMatchingPatterns, so we have some incomplete testing
of that function in the meantime.
@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

Merging #24576 into master will increase coverage by 0.18%.
The diff coverage is n/a.

Impacted Files Coverage Δ
dag/marshal.go 53.40% <0.00%> (+1.13%) ⬆️
internal/getproviders/types.go 33.33% <0.00%> (+2.63%) ⬆️
internal/getproviders/mock_source.go 55.73% <0.00%> (+55.73%) ⬆️
internal/getproviders/multi_source.go 71.57% <0.00%> (+71.57%) ⬆️

@apparentlymart apparentlymart merged commit c6535a0 into master Apr 7, 2020
@apparentlymart apparentlymart deleted the f-getproviders-multisource-tests branch April 7, 2020 15:55
@ghost
Copy link

ghost commented May 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants