Fix DocAI Warehouse tests to work properly with a test project #17957
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #15407
Required permissions added in GoogleCloudPlatform/magic-modules#10528
These tests were in a weird state. To use DocAI Warehouse, you first need to "provision the project", which is a sort of one-time initialization operation per-location. It appears this was never done properly on our GA or beta projects. For our presubmit project, it seems that it was partially successful (and to be honest, I couldn't tell how it got into that state).
In addition, it appears the
google_document_ai_warehouse_location
wasn't being adequately tested, since it is a singleton resource being tested with our primary test project.This change combines the testing for both resources into a single test, which first creates a new project, then provisions it, and then tests the various document schemas. I included all of the prior configs for completeness, but arguably they could be reduced to one or a few.
Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#10526