Skip to content

Fix DocAI Warehouse tests to work properly with a test project #17957

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

Conversation

modular-magician
Copy link
Collaborator

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

…corp#10526)

[upstream:2b3d1569bfcb8b34144a94509cf77caa8f83d640]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit 3b8109d into hashicorp:main Apr 25, 2024
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
@modular-magician modular-magician deleted the downstream-pr-2b3d1569bfcb8b34144a94509cf77caa8f83d640 branch November 17, 2024 02:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test(s): TestAccDocumentAIWarehouseDocumentSchema*
1 participant