-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring focused on TerraformCommand
The work to continue refactoring this code continues; the primary motiviation is to improve unit tests, and lower the friction to adding new functionality. The TerraformCommand is a focus for this effort due to both the number of largely untestable methods, and its criticality to the project as a whole. - centralize many exceptions into the tfworker.exceptions module - create tfworker.types to start using enums for common strings - JSON type moved out of an __init__ into types - create TerraformAction type (plan/apply/destroy) - create TerraformStage type (pre/post, relation to Action) - create a tfworker.util.terraform for terraform utility methods - move get_terraform_version to tfworker.util.terraform - move get_platform to tfworker.util.system - create tfworker.util.hooks to handle all operations related to executing hook scripts. These all forced onto the TerraformCommand class previously - hooks has high test coverage - move - clean up and create constants for references to files that tfworker creates - In TerraformCommand: - break down the logic that determines how to plan into smaller methods - reorder and group remaining methods - removed all the hook related methods There are a lot of changes overall to the tests which are not enumerated, the complexity of testing is going down, and coverage is going up. Any areas of touched code are standardizing on using the Google Python Docstring comments format, and are having type annotations added
- Loading branch information
Showing
21 changed files
with
1,143 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.