OCM-5027 | feat: Added KubeletConfigClient and mock to be shared between Terraform and ROSA CLI #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See terraform-redhat/terraform-provider-rhcs#413
This PR comes from a discussion on the above PR with @nirarg . Given that the
KubeletConfigClient
interface, implementation, mock and matcher are not specific to the TF project, the proposal is to move these intoocm-common
. This then provides a mechanism for us to re-use this client in both the ROSA CLI and Terraform.The
KubeletConfigClient
has been designed to make it easier to work with the OCM GO SDK in unit tests by providing a clear interface and then mocks that can be used to setup and verify expected interactions. The goal here being to keep the tests light weight and only interact with the OCM SDK in e2e scenarios.This provides a base for a pattern for us to extend as we look to make both TF and the ROSA CLI more unit testable.