sdk-acceptance-testing

Implements acceptance tests for Envilder SDKs using TestContainers with LocalStack and Lowkey Vault.

138|5|Updated Sep 19, 2024
One-click install
npx skills add https://github.com/macalbert/envilder --skill sdk-acceptance-testing-macalbert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdk-acceptance-testing
Source: https://github.com/macalbert/envilder/tree/main/.github/skills/sdk-acceptance-testing
Command: npx skills add https://github.com/macalbert/envilder --skill sdk-acceptance-testing-macalbert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing acceptance tests for SDKs that resolve secrets from AWS SSM or Azure Key Vault normally requires real cloud credentials and infrastructure. This Skill provides repeatable patterns for testing against local cloud emulators, so every SDK (.NET, Python, Node.js, Go, Java) gets consistent, credential-free acceptance test coverage. ## Core Features & Use Cases - Container Wrapper Patterns: Standardized lifecycle requirements for LocalStack (AWS SSM) and Lowkey Vault (Azure Key Vault) TestContainers wrappers, including token resolution, TLS handling, and teardown. - Acceptance Test Conventions: Naming conventions (Should_{Expected}When{Condition}), AAA test structure, and the minimum standard test set each SDK must implement per provider. - CI Workflow Integration: GitHub Actions configuration with OIDC credentials, Docker socket overrides for TestContainers, and job-level environment variables. - Use Case: When adding a new Go SDK to the Envilder project, use this Skill to replicate the container wrappers, acceptance tests, and CI workflow steps already proven in the .NET, Python, and Node.js implementations. ## Quick Start Ask the AI to add acceptance tests for a new SDK following the sdk-acceptance-testing patterns with LocalStack and Lowkey Vault container wrappers.

Frequently Asked Questions about sdk-acceptance-testing

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

FAQPage Schema
How do I write acceptance tests for AWS SSM without real AWS credentials?

Use TestContainers with the localstack/localstack:stable image to emulate SSM locally. Resolve the LOCALSTACK_AUTH_TOKEN from envilder.json before starting the container, then create an SSM client pointing at the container's exposed endpoint URL.

How to test Azure Key Vault SDK code locally with TestContainers?

Run the nagyesta/lowkey-vault container with ports 8443 and 8080, set IDENTITY_ENDPOINT and IDENTITY_HEADER environment variables for DefaultAzureCredential, and disable TLS certificate verification in the test SecretClient since Lowkey Vault uses self-signed certificates.

Why do TestContainers tests fail on GitHub Actions runners?

TestContainers often fails on CI because it cannot locate the Docker socket. Set TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE to /var/run/docker.sock and DOCKER_HOST to unix:///var/run/docker.sock in the test step's environment variables.

What acceptance tests should each Envilder SDK implement at minimum?

Each SDK needs four tests: resolving an existing secret and returning empty for a missing parameter on AWS SSM via LocalStack, plus the same two cases for Azure Key Vault via Lowkey Vault. Tests follow the Should_{Expected}_When_{Condition} naming convention.

Does the LocalStack container wrapper work when Azure credentials are missing in CI?

Yes, the pattern includes a fallback: if the configured provider cannot be created, such as when Azure credentials are absent in an AWS-only OIDC environment, the wrapper falls back to the AWS provider to resolve the token.