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

[Terraform] remove auto_healing_policies from tests #979

Merged
merged 5 commits into from
Dec 5, 2018

Conversation

danawillow
Copy link
Contributor

@danawillow danawillow commented Dec 1, 2018


[all]

[terraform]

Remove auto_healing_policies from tests

[terraform-beta]

[ansible]

[inspec]

@danawillow danawillow changed the title only set auto_healing_policies in tests in beta [Terraform] only set auto_healing_policies in tests in beta Dec 1, 2018
@modular-magician
Copy link
Collaborator

modular-magician commented Dec 1, 2018

I am a robot that works on MagicModules PRs!

I built this PR into one or more PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google#2557
depends: hashicorp/terraform-provider-google-beta#169

@rileykarson
Copy link
Member

Why not delete it at Beta too? We test auto_healing_policies with a separate test, and I bet it just cropped up here by that one being copy pasted.

@danawillow danawillow changed the title [Terraform] only set auto_healing_policies in tests in beta [Terraform] remove auto_healing_policies from tests Dec 3, 2018
@modular-magician
Copy link
Collaborator

I am (still) a robot that works on MagicModules PRs!

I just wanted to let you know that your changes (as of commit dc80ddf) have been included in your existing downstream PRs.

@rileykarson
Copy link
Member

Looks like the tpgb changes are missing?

@danawillow
Copy link
Contributor Author

Hmm I'm not sure whether the magician has the capability to add PRs after the initial set was generated, but I went ahead and opened it myself (since the branch was created successfully in the modular-magician fork). That'll probably be fine.

Also for context in case you're curious, hashicorp/terraform-provider-google#522 was the PR that added auto_healing_policies in the first place, and it was in order to test the fact that IGM was using beta APIs but backend services weren't. So it did have a good reason to be there (at least for one test). Actually now I've convinced myself that I should add it back for one test, since people might use TPG/TPGB together. Don't approve this yet.

@rileykarson
Copy link
Member

Cool! I think we used https://github.com/GoogleCloudPlatform/magic-modules/blob/master/third_party/terraform/tests/resource_compute_instance_group_manager_test.go.erb#L234 as a test for versions in general initially. Is this test specific to BackendService or would it better be homed there?

@danawillow
Copy link
Contributor Author

It's specific to backendservice since it tests the URL inside of a set.

@danawillow
Copy link
Contributor Author

Ok I un-convinced myself that we need that test, since the presence of a beta feature in a config no longer influences which API we call, so that test isn't actually going to test interplay between beta/GA.

@rileykarson
Copy link
Member

Was it testing that we properly diffsuppress/guarded self links in a set maybe? I could see the value in keeping a test that does that & I thought that was what you meant. Let me know if you're still unconvinced & I should review as-is!

@danawillow
Copy link
Contributor Author

auto_healing_policies is a beta feature, which means it only exists in the beta provider. however, it used to act as a toggle- if it was set, then we called the beta apis, otherwise we called the ga ones. since it doesn't act as a toggle anymore, it doesn't need to be in our tests. does that make sense?

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM + downstreams

Talked offline - using a beta feature like this one used to be the only way to choose the API version, but now we can make anything beta by using the Beta provider. We don't need auto_healing_policies in these tests anymore.

@modular-magician
Copy link
Collaborator

I am (still) a robot that works on MagicModules PRs!

I just wanted to let you know that your changes (as of commit f1781d0) have been included in your existing downstream PRs.

@modular-magician modular-magician merged commit 3249d3d into master Dec 5, 2018
@danawillow danawillow deleted the backend-service-tests branch December 5, 2018 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants