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

Consider Unit Testing tf5server/tf6server ServeOpt to ServeConfig Conversion #154

Open
bflad opened this issue Feb 7, 2022 · 0 comments

Comments

@bflad
Copy link
Member

bflad commented Feb 7, 2022

terraform-plugin-go version

v0.7.0

Use cases

The Serve functions of tfprotov5/tf5server and tfprotov6/tf6server introduce non-trivial conversion of ServeOpt into the ServeConfig and go-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant