Skip to main content

run-acctests

Executes acceptance tests (testacc) for a specific resource or suite in the GA or beta provider and outputs verbose debug logs.

Source facts

Repository
GoogleCloudPlatform/magic-modules
Last source activity
October 22, 2026 at 23:10
Detected SKILL.md language
English
Stars
975
Forks
2,573

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
run-acctests
description
Executes acceptance tests (testacc) for a specific resource or suite in the GA or beta provider and outputs verbose debug logs.
# `run-acctests` > **Note to AI Agents:** You MUST read the YAML frontmatter above first. Only read the rest of this file if the `description` matches your current roadblock or required task. ## Prerequisites * Know the provider (`beta` or `ga`), service (e.g. `compute`), and test name (e.g. `TestAccComputeInstance_basic`). * The provider must be generated from your current changes (`generate-provider` with the same `VERSION`). * PR CI only runs beta acceptance tests, so run GA locally whenever GA behavior matters. ## Execution Steps ### 1. Select the provider ```bash VERSION="beta" # or "ga" if [ "$VERSION" = "ga" ]; then REPO=terraform-provider-google; PKG_DIR=google else REPO=terraform-provider-google-beta; PKG_DIR=google-beta fi cd "${GOPATH:-$HOME/go}/src/github.com/hashicorp/$REPO" && pwd ``` ### 2. Run the test List all `func TestAcc` functions in the target test file (`grep '^func TestAcc' <test_file>`) and explicitly run each relevant test. Stream `TF_LOG=DEBUG` output to a log file so failures can be parsed. ```bash TF_LOG=DEBUG make testacc TEST=./$PKG_DIR/services/<SERVICE_NAME> TESTARGS='-run=<TEST_NAME>$$' > test_output_$VERSION.log 2>&1 ``` `no tests to run` on GA usually means the test isn't generated for GA (still guarded or `min_version: beta`). That is a finding, not a pass. ### 3. Verification & Handoff * If the test succeeds, return to your primary workflow. * If the test fails, do **NOT** attempt a blind fix immediately. You MUST invoke the `parse-debug-logs` skill on the log file to understand the API failure before proposing a fix.
View on GitHub