unit-test

Run plan-only Terraform unit tests with mocked providers for ai-accelerator-tf.

3|2|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/oci-ai-incubations/ai-accelerator-starter-packs --skill unit-test-oci-ai-incubations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test
Source: https://github.com/oci-ai-incubations/ai-accelerator-starter-packs/tree/main/.claude/skills/unit-test
Command: npx skills add https://github.com/oci-ai-incubations/ai-accelerator-starter-packs --skill unit-test-oci-ai-incubations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Terraform unit testing typically requires cloud credentials or complex scaffolding; this skill enables plan-only unit tests against the ai-accelerator-tf module using mocked providers, removing cloud access needs.

Core Features & Use Cases

  • Supports running unit tests in ai-accelerator-tf with mocked providers and no cloud credentials.
  • Allows filtering tests by file to focus on changes.
  • Provides guidance for CI integration and local development workflows.

Quick Start

Run the Terraform unit test suite in the ai-accelerator-tf directory using the built-in test harness.

Frequently Asked Questions about unit-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Terraform unit tests without cloud credentials?

You can run Terraform unit tests without cloud credentials by using a plan-only test harness with mocked providers, which simulates infrastructure resources locally and removes the need for cloud access during validation.

Can I filter specific Terraform unit tests to run during local development?

Yes, you can filter Terraform unit tests by file to focus only on specific changes, allowing you to validate targeted infrastructure-as-code modifications without executing the entire test suite.

Does the Terraform unit test harness work with older infrastructure-as-code versions?

The test harness leverages Terraform 1.7+ features for mocks while keeping the code under test 1.5-compatible, ensuring broader compatibility for your infrastructure-as-code modules.

How do I integrate Terraform mocked provider tests into a CI pipeline?

You can integrate Terraform mocked provider tests into a CI pipeline by running the plan-only test suite without cloud credentials, enabling automated infrastructure validation during continuous integration workflows.

What is the best way to validate Terraform changes without provisioning real infrastructure?

The best way to validate Terraform changes without provisioning real infrastructure is using plan-only unit tests with mocked providers, which verifies module logic locally or in CI without cloud access.