You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Serve functions of tfprotov5/tf5server and tfprotov6/tf6server introduce non-trivial conversion of ServeOpt into the ServeConfig and go-pluginplugin.ServeConfig, which is not currently unit tested. To prevent regressions, unit testing should be introduced with any necessary refactoring.
Proposal
Potentially refactor the server configuration preparation of Serve into its own function, then introduce unit testing against that logic.
Another option may be to refactor out ServeConfig usage, which currently implements unexported fields.
terraform-plugin-go version
Use cases
The
Serve
functions oftfprotov5/tf5server
andtfprotov6/tf6server
introduce non-trivial conversion ofServeOpt
into theServeConfig
andgo-plugin
plugin.ServeConfig
, which is not currently unit tested. To prevent regressions, unit testing should be introduced with any necessary refactoring.Proposal
Potentially refactor the server configuration preparation of
Serve
into its own function, then introduce unit testing against that logic.Another option may be to refactor out
ServeConfig
usage, which currently implements unexported fields.References
The text was updated successfully, but these errors were encountered: