Agent Native

run-acceptance-tests

This skill guides the agent to run and diagnose Terraform provider acceptance tests, which are Go test functions prefixed with TestAcc that provision real…

by HashiCorpOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (hashicorp)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MPL-2.0 (copyleft)
Pin
f706481pinned Oct 9, 2026
Context cost
about 660 tokenswhen the skill loads
GitHub stars
890on hashicorp/agent-skills
Scripts
None found

What it does

“Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`, when a test fails with missing environment variables, or when diagnosing a failing or suspiciously passing acceptance test.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill guides the agent to run and diagnose Terraform provider acceptance tests, which are Go test functions prefixed with TestAcc that provision real infrastructure. The skill covers test execution with required environment variables like TF_ACC=1, discovering provider-specific credentials, and progressive troubleshooting techniques including verbose output and debug logging. It also addresses test validation by intentionally breaking assertions to confirm they actually catch failures.

When to use it

  • Running Terraform provider acceptance tests locally or in CI environments
  • Troubleshooting failed acceptance tests with missing environment variables
  • Validating that test assertions actually detect failures
  • Understanding required provider credentials for test execution

When not to

  • Writing new acceptance tests from scratch, use provider-test-patterns skill instead
  • Testing without access to provider API credentials
  • Situations where creating real infrastructure is inappropriate or expensive

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add hashicorp/agent-skills --skill run-acceptance-tests

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install hashicorp/agent-skills run-acceptance-tests@f706481af9b8fedb66de909f6243ad29601afa0c

Installs the commit we checked (f706481).

Copy by hand

Download the folder at f706481 and put it in .claude/skills/run-acceptance-tests for Claude Code and in .agents/skills/run-acceptance-tests for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at f706481

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "run-acceptance-tests" by HashiCorp.

Source, pinned to commit f706481af9b8fedb66de909f6243ad29601afa0c:
https://github.com/hashicorp/agent-skills/tree/f706481af9b8fedb66de909f6243ad29601afa0c/plugins/terraform/skills/run-acceptance-tests

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/run-acceptance-tests/ for Claude Code and .agents/skills/run-acceptance-tests/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/hashicorp/run-acceptance-tests

SKILL.md at the pin

---
name: run-acceptance-tests
description: Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`, when a test fails with missing environment variables, or when diagnosing a failing or suspiciously passing acceptance test.
license: MPL-2.0
metadata:
  lifecycle-status: active
  copyright: Copyright IBM Corp. 2026
  version: "0.0.1"
---

An acceptance test is a Go test function with the prefix `TestAcc`.

Before running: acceptance tests create **real infrastructure** against the
provider's live API, which may incur cost. Confirm the configured
credentials point at a test account before proceeding.

To run a focused acceptance test named `TestAccFeatureHappyPath`:

1. Run `go test -run=TestAccFeatureHappyPath -timeout 60m` with the
   following environment variables:
   - `TF_ACC=1`

   Default to non-verbose test output. Always pass an explicit `-timeout`:
   `go test` kills any test run after 10 minutes by default, and acceptance
   tests routinely exceed that.
1. The acceptance tests may require additional environment variables for
   specific providers. To discover which ones:
   - Read the test's `PreCheck` / `testAccPreCheck` function and search the
     test files: `grep -rn "os.Getenv" --include="*_test.go"`.
   - Check the repository's README, CONTRIBUTING, or `.env.example` for
     documented test setup.
   - The provider's `Configure` method shows how credentials are resolved;
     use the `provider-configuration` skill (if available) to understand a
     credential provider chain.

   Set the variables for the single test invocation
   (`EXAMPLE_API_KEY=... TF_ACC=1 go test ...`) rather than exporting them
   into the shell profile, and never write secret values into files inside
   the repository.

To diagnose a failing acceptance test, use these options, in order. These
options are cumulative: each option includes all the options above it.

1. Run the test again. Use the `-count=1` option to ensure that `go test` does
   not use a cached result.
1. Offer verbose `go test` output. Use the `-v` option.
1. Offer debug-level logging. Enable debug-level logging with the environment
   variable `TF_LOG=debug`.
1. Offer to persist the acceptance test's Terraform workspace. Enable
   persistence with the environment variable `TF_ACC_WORKING_DIR_PERSIST=1`.

A passing acceptance test may be a false negative. To "flip" a passing
acceptance test named `TestAccFeatureHappyPath`:

1. Edit the value of one of the TestCheckFuncs in one of the TestSteps in the
   TestCase.
1. Run the acceptance test. Expect the test to fail.
1. If the test fails, then undo the edit and report a successful flip. Else,
   keep the edit and report an unsuccessful flip.

If a test run is interrupted, real resources may be left behind; run the
provider's sweepers if it registers them (see the `provider-test-patterns`
skill's sweeper reference, if available). For writing or restructuring
tests, use the `provider-test-patterns` skill.

From hashicorp/agent-skills at f706481, shown as plain text under its license: MPL-2.0 (copyleft). The license text is in plugins/terraform/skills/run-acceptance-tests/SKILL.md.

View SKILL.md on GitHub at f706481

Files

1 file, 3.1 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at f706481
All 19 skills from HashiCorp

More from HashiCorp

  • aws-ami-builder

    This skill enables the agent to build custom Amazon Machine Images using Packer's amazon-ebs builder.

    Claude Code, Codex, Cursor +4 · about 870 tokens · pinned 6 days ago

  • azure-image-builder

    This skill uses Packer's Azure ARM builder to create custom managed images and Compute Gallery images in Azure.

    Claude Code, Codex, Cursor +4 · about 1K tokens · pinned 6 days ago

  • azure-verified-modules

    This skill provides comprehensive requirements and best practices for developing Azure Terraform modules that meet Azure Verified Modules (AVM) certification…

    Claude Code, Codex, Cursor +4 · about 4K tokens · pinned 6 days ago

  • new-terraform-provider

    Scaffolds a new Terraform provider using the Plugin Framework by creating workspace structure, initializing a Go module, and generating main.go and…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 330 tokens · pinned 6 days ago

  • provider-actions

    This skill guides implementing Terraform Actions, imperative operations that execute at provider lifecycle events using the Plugin Framework.

    Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago

  • provider-configuration

    This skill guides implementing Terraform provider authentication using the Plugin Framework, covering provider schema design, credential provider chains that…

    Claude Code, Codex, Cursor +4 · about 3.3K tokens · pinned 6 days ago

All Testing and QA skills
  • provider-test-patterns

    This skill covers acceptance test patterns for Terraform providers using terraform-plugin-testing with the Plugin Framework.

    by HashiCorpOfficial publisher

    Claude Code, Codex, Cursor +4 · about 3K tokens · pinned 6 days ago

  • terraform-test

    This skill teaches agents to write and execute Terraform tests using .tftest.hcl files with run blocks and assertions.

    by HashiCorpOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.7K tokens · pinned 6 days ago

  • next-partial-prefetching-optimizer

    This skill optimizes Next.js client-side navigation under Partial Prefetching by defining what UI loads before and after a click.

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago

  • Invalid--Name

    This skill cannot be described because its name format is invalid and no functional description or instructions are provided in the skill metadata.

    by CrewAIOfficial publisher

    Claude Code, Codex, Cursor +4 · about 0 tokens · pinned 6 days ago

  • chrome-devtools-cli

    This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.

    by GoogleOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago

  • triaging-visual-review-runs

    Inspects PostHog Visual Review screenshot regression runs that gate pull requests, helping engineers triage diff results, identify flaky stories, and decide…

    by PostHogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 8.9K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use