Skip to content

Commit

Permalink
Fix DocAI Warehouse tests to work properly with a test project (Googl…
Browse files Browse the repository at this point in the history
  • Loading branch information
roaks3 authored Apr 25, 2024
1 parent cc409a3 commit 2b3d156
Show file tree
Hide file tree
Showing 12 changed files with 615 additions and 283 deletions.
44 changes: 2 additions & 42 deletions mmv1/products/documentaiwarehouse/DocumentSchema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,10 @@ custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/document_ai_warehouse_document_schema.go.erb
examples:
- !ruby/object:Provider::Terraform::Examples
# docs only, testing is done in an update test
skip_test: true
name: "document_ai_warehouse_document_schema_text"
primary_resource_id: "example_text"
vars:
document_schema_name: "schema-name-text"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_integer"
primary_resource_id: "example_integer"
vars:
document_schema_name: "schema-name-integer"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_float"
primary_resource_id: "example_float"
vars:
document_schema_name: "schema-name-float"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_property"
primary_resource_id: "example_property"
vars:
document_schema_name: "schema-name-property"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_property_enum"
primary_resource_id: "example_property_enum"
vars:
document_schema_name: "schema-name-property-enum"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_enum"
primary_resource_id: "example_enum"
vars:
document_schema_name: "schema-name-enum"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_map"
primary_resource_id: "example_map"
vars:
document_schema_name: "schema-name-map"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_datetime"
primary_resource_id: "example_datetime"
vars:
document_schema_name: "schema-name-datetime"
- !ruby/object:Provider::Terraform::Examples
name: "document_ai_warehouse_document_schema_timestamp"
primary_resource_id: "example_timestamp"
vars:
document_schema_name: "schema-name-timestamp"
parameters:
- !ruby/object:Api::Type::String
name: 'project_number'
Expand Down
3 changes: 2 additions & 1 deletion mmv1/products/documentaiwarehouse/Location.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ skip_sweeper: true
exclude_import: true
examples:
- !ruby/object:Provider::Terraform::Examples
# docs only, testing is done in a DocumentSchema update test
skip_test: true
name: "document_ai_warehouse_location"
primary_resource_id: "example"
skip_import_test: true
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 30
update_minutes: 30
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "google_document_ai_warehouse_document_schema" "example_text" {
resource "google_document_ai_warehouse_document_schema" "<%= ctx[:primary_resource_id] %>" {
project_number = data.google_project.project.number
display_name = "test-property-text"
location = "us"
Expand Down

This file was deleted.

Loading

0 comments on commit 2b3d156

Please sign in to comment.