Closed EronWright closed 8 months ago
Attention: Patch coverage is 85.71429%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 37.27%. Comparing base (
8c45fd2
) to head (dd332f3
). Report is 15 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
providers/localBinary.go | 50.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@danielrbradley I would argue that functional options are counter-productive in this case, because the ProviderFactory
isn't a user-facing API, and that implementing a factory would be more difficult. Functional options are routinely converted to an options
representation for further processing; why make each factory do this? ProviderOptions
can be understood as the already-converted representation.
If you're still wanting it, let me know and I'll give it a try. Thanks!
Ok, been mulling this over a little more. Passing an argument for WorkDir to the provider assumes that the factory has to honnor it, but some implementations may well not use it. Therefore one subtle change would be to not pass in options but pass in some context about the program under test. This could be a simple interface with just a Source()
method for now but could be added to if needed. This interface would already be implemented by the PulumiTest
struct. E.g.
type PulumiTest interface {
Source() string
}
Closes #65
Breaking changes:
providers.ProviderFactory
signature change to accept an abstractproviders.PulumiTest
for contextual information.providers.ResourceProviderServerFactory
signature change to acceptproviders.PulumiTest
.