magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Allow for tests to override http clients

Open justinsb opened this issue 2 years ago • 10 comments

This allows for easier mocking of the GCP services.

Tests only, not user-facing

justinsb avatar Jul 07 '22 22:07 justinsb

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

modular-magician avatar Jul 07 '22 22:07 modular-magician

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @rileykarson, a repository maintainer, has been assigned to assist you and help review your changes.

:question: First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


modular-magician avatar Jul 07 '22 22:07 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 12 insertions(+), 2 deletions(-)) Terraform Beta: Diff ( 1 file changed, 12 insertions(+), 2 deletions(-)) TF Validator: Diff ( 3 files changed, 15 insertions(+), 5 deletions(-))

modular-magician avatar Jul 07 '22 22:07 modular-magician

Tests analytics

Total tests: 2090 Passed tests 1862 Skipped tests: 226 Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation

modular-magician avatar Jul 07 '22 23:07 modular-magician

Tests failed during RECORDING mode: TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view] TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation[view]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Jul 07 '22 23:07 modular-magician

Not sure if this works, but ...

/retest

"Tenancy unit reached the maximum number of tenant projects." suggests an unrelated test-failure to me.

justinsb avatar Jul 12 '22 15:07 justinsb

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 12 insertions(+), 2 deletions(-)) Terraform Beta: Diff ( 1 file changed, 12 insertions(+), 2 deletions(-)) TF Validator: Diff ( 3 files changed, 15 insertions(+), 5 deletions(-))

modular-magician avatar Jul 12 '22 15:07 modular-magician

Tests analytics

Total tests: 2094 Passed tests 1865 Skipped tests: 226 Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease

modular-magician avatar Jul 12 '22 16:07 modular-magician

Tests passed during RECORDING mode: TestAccFirebaserulesRelease_BasicRelease[view]

Tests failed during RECORDING mode: TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation[view] TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Jul 12 '22 16:07 modular-magician

Don't worry about the VCR test failures, I can work out whether we need to block or not. Many of these integration tests are somewhat flaky.

rileykarson avatar Jul 13 '22 17:07 rileykarson