Refactor BasicGoogleDeployHandler in clouddriver #6985
Labels
component/clouddriver
enhancement
stale
testing/needs-tests
Code paths/features that should be exercised by our integration test suite.
Issue Summary:
Currently the tests for BasicGoogleDeployHandler are disabled due to bad practices on the code that is deploying GCE instances in Spinnaker. It is hard to test existing and new features with the existing implementation.
Cloud Provider(s):
Google - GCE
Additional Details:
BasicGoodleDeployHandler class is responsible on create InstanceTemplates and Instance Groups for GCE but it is a single method with ~500 lines of code: https://github.com/spinnaker/clouddriver/blob/master/clouddriver-google/src/main/groovy/com/netflix/spinnaker/clouddriver/google/deploy/handlers/BasicGoogleDeployHandler.groovy#L148
it is almost imposible to mock everything to test and the existing tests are disabled: https://github.com/spinnaker/clouddriver/blob/master/clouddriver-google/src/test/groovy/com/netflix/spinnaker/clouddriver/google/deploy/handlers/BasicGoogleDeployHandlerSpec.groovy
We need to refactor the code to test GCE features properly.
The text was updated successfully, but these errors were encountered: