بنقرة واحدة
tgc-fix-integration-tests-skill
Fix integration tests for TGC. Use when you need to fix integration tests for TGC.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Fix integration tests for TGC. Use when you need to fix integration tests for TGC.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Skill for reviewing Magic Modules schemas. Currently covers the Enum vs. String decision via the knowledge base.
Opt resource into MMv1 list-resource generation by setting `generate_list_resource: true`, validate it locally, and open a one-resource PR against GoogleCloudPlatform/magic-modules. Invoke when the user asks to add list-resource support for a specific MMv1 resource or to enable `generate_list_resource` for an eligible resource.
Fallback workflow for general implementation and debugging tasks that do not involve creating a new resource.
Workflow specifically for creating a new resource, supporting both autogen and manual generation.
Create a Pull Request (PR) against GoogleCloudPlatform/magic-modules following repository standards, including branch management, commit formatting, mandatory release notes, pre-PR verification checks, and gh CLI commands.
Validate that changes to the generated providers don't introduce breaking changes or fields with missing tests or missing documentation. Use this skill when the user wants to check for breaking changes, missing tests, or missing documentation, or other problems in the downstream providers.
| name | tgc-fix-integration-tests-skill |
| description | Fix integration tests for TGC. Use when you need to fix integration tests for TGC. |
When you need to fix integration tests for TGC, use this skill.
To fix integration tests, follow the guidelines and playbook below:
When troubleshooting and resolving test failures, adhere to these constraints:
mmv1/templates/terraform or shared helper files/templates in mmv1/third_party/terraform. It is only allowed to modify the templates in mmv1/templates/tgc_next or TGC Next custom files under mmv1/third_party/tgc_next/.mmv1/third_party/cai2hcl or mmv1/third_party/tgc. All changes must be made to TGC Next code in mmv1/third_party/tgc_next/.ignore_read_extra to the example in Resource.yaml.mmv1/api/resource/custom_code.go unless explicitly guided by the user.custom_code, including any constants.d.Set in custom decoders for cai2hcl. Conversion in cai2hcl is a direct mapping from CAI asset data maps to HCL maps without involving Terraform state. Mutate the data map directly.is_missing_in_cai: true if the missing fields are present in other raw JSON files of other tests.mmv1/api/resource.go to hardcode or manually append ignored fields for tests. If there is a field path mapping mismatch (e.g., due to singular/plural name differences), rename the property name in the resource YAML configuration (e.g., Instance.yaml) and use api_name to map it to the API field name.Test_export.tf, Test_roundtrip.json, and Test_roundtrip.tf to identify the exact stage where data is lost or mutated, rather than guessing based on the final error message.When tests are not being generated or run for a resource, ensure that the handwritten test files in mmv1/third_party/terraform/services/<product>/ follow the expected naming convention: resource_<product>_<resource_name>_test.go.
If the file name does not match, the generator function addTestsFromHandwrittenTests will fail to find it and will log a message like no handwritten test file found for <resource>. Renaming the file to match the expected convention allows the generator to discover it.
The detailed troubleshooting playbook has been moved to a separate file to keep this skill description concise.
Please refer to Troubleshooting Playbook for solutions to common test failures.