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

Refactor BasicGoogleDeployHandler in clouddriver #6985

Open
edgarulg opened this issue Sep 27, 2024 · 2 comments
Open

Refactor BasicGoogleDeployHandler in clouddriver #6985

edgarulg opened this issue Sep 27, 2024 · 2 comments
Labels
component/clouddriver enhancement stale testing/needs-tests Code paths/features that should be exercised by our integration test suite.

Comments

@edgarulg
Copy link

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.

@edgarulg
Copy link
Author

@spinnakerbot
Copy link

This issue hasn't been updated in 45 days, so we are tagging it as 'stale'. If you want to remove this label, comment:

@spinnakerbot remove-label stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/clouddriver enhancement stale testing/needs-tests Code paths/features that should be exercised by our integration test suite.
Projects
None yet
Development

No branches or pull requests

2 participants