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.
This is a draft for introducing some different testing methodologies in an effort to increase test coverage and refactor some of our existing logic.
Starting with /internal/install/discovery, a new mocks directory was introduced, and mocks were built from Discoverer and Validator interfaces using mockery. The end result within the tests appears similar to the previous stubs, but the package is a bit cleaner overall.
Some of the existing mocks in this package seemed a bit odd in how they were used; this led to some refactoring of logic within
recipe_installer
and focused on removing receiver objects from RecipeInstall that don't really need to be there, such as os discover and manifest validation. These two receivers were extracted into function variables which provides the flexibility to override their implementation in recipe_installer_test as well as remove unnecessary members from RecipeInstall