{"id":29878377,"url":"https://github.com/davidcollom/terratest-utils","last_synced_at":"2026-05-19T04:05:31.185Z","repository":{"id":306323725,"uuid":"1025778892","full_name":"davidcollom/terratest-utils","owner":"davidcollom","description":"Terratest-style helpers for testing Kubernetes Custom Resources like Argo CD, Rollouts, Workflows, cert-manager, Flux, and ESO","archived":false,"fork":false,"pushed_at":"2025-07-24T21:09:50.000Z","size":112,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-25T01:47:33.658Z","etag":null,"topics":["argocd","cert-manager","externalsecret","fluxcd","golang","kubernetes","terratest","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcollom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T19:35:39.000Z","updated_at":"2025-07-24T21:09:53.000Z","dependencies_parsed_at":"2025-07-25T01:47:44.740Z","dependency_job_id":"71159231-7a62-45f4-abd0-fcc67af681b6","html_url":"https://github.com/davidcollom/terratest-utils","commit_stats":null,"previous_names":["davidcollom/terratest-utils"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/davidcollom/terratest-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcollom%2Fterratest-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcollom%2Fterratest-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcollom%2Fterratest-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcollom%2Fterratest-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcollom","download_url":"https://codeload.github.com/davidcollom/terratest-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcollom%2Fterratest-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268003458,"owners_count":24179290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","cert-manager","externalsecret","fluxcd","golang","kubernetes","terratest","testing"],"created_at":"2025-07-31T07:02:03.685Z","updated_at":"2026-05-19T04:05:31.177Z","avatar_url":"https://github.com/davidcollom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terratest Utils\n\nThis package provides a set of helpers for [Terratest](https://terratest.gruntwork.io/) and general integration testing. It is designed to help validate that platforms and deployments have been successfully provisioned and configured.\n\n## Features\n\n- Utilities for testing Kubernetes resources, including cert-manager, external-secrets, ArgoCD, and Flux\n- Functions to check readiness, status, and correctness of deployed resources\n- Simplifies writing robust integration tests for cloud-native platforms\n- Can be used with Terratest or standalone in Go test suites\n\n## Usage\n\nImport the relevant package(s) in your Terratest or Go integration tests:\n\n```go\nimport (\n    \"github.com/davidcollom/terratest-utils/pkg/certmanager\"\n    \"github.com/davidcollom/terratest-utils/pkg/externalsecrets\"\n    // ...other helpers\n)\n```\n\nUse the provided functions to validate resources, e.g.:\n\n```go\nimport (\n    \"testing\"\n    \"time\"\n\n    \"github.com/davidcollom/terratest-utils/pkg/certmanager\"\n    \"github.com/davidcollom/terratest-utils/pkg/flux\"\n    \"github.com/gruntwork-io/terratest/modules/k8s\"\n)\n\nfunc TestPlatform(t *testing.T) {\n    options := k8s.NewKubectlOptions(\"\", \"\", \"default\")\n\n    // Wait for a cert-manager Certificate to become Ready\n    certmanager.WaitForCertificateReady(t, options, \"my-cert\", \"default\", 5*time.Minute)\n\n    // List all Flux HelmReleases in a namespace\n    releases := flux.ListHelmReleases(t, options, \"flux-system\")\n\n    // Use the E variant to handle errors yourself\n    cert, err := certmanager.NewClient(t, options)\n    // ...\n}\n```\n\nEvery helper is available in two forms:\n- `VerbResource(t, options, ...)` — fails the test on error\n- `VerbResourceE(t, options, ...)` — returns `(value, error)` for custom handling\n\n## Structure\n\n| Package | Description |\n|---|---|\n| `pkg/argo/cd` | Helpers for ArgoCD Application, ApplicationSet, and AppProject resources |\n| `pkg/argo/events` | Helpers for Argo Events — EventBus, EventSource, Sensor |\n| `pkg/argo/rollouts` | Helpers for Argo Rollouts |\n| `pkg/argo/workflows` | Helpers for Argo Workflows, CronWorkflows, WorkflowTemplates, and WorkflowPhases |\n| `pkg/certmanager` | Helpers for cert-manager Certificate, Issuer, ClusterIssuer, CertificateRequest, Order, and Challenge resources |\n| `pkg/externalsecrets` | Helpers for External Secrets Operator — ExternalSecret, ClusterExternalSecret, SecretStore, ClusterSecretStore, PushSecret |\n| `pkg/flux` | Helpers for Flux v2 — HelmRelease, HelmRepository, HelmChart, GitRepository, Kustomization, Bucket, OCIRepository |\n| `pkg/istio` | Helpers for Istio networking (Gateway, VirtualService, DestinationRule, ServiceEntry, Sidecar, EnvoyFilter, WorkloadEntry, WorkloadGroup) and security (AuthorizationPolicy, PeerAuthentication, RequestAuthentication) |\n| `pkg/k8s` | Core Kubernetes helpers — CRD, StatefulSet — plus the `KubectlOptions` alias |\n| `pkg/linkerd` | Helpers for Linkerd policy and traffic resources — Server, ServerAuthorization, AuthorizationPolicy, HTTPRoute, MeshTLSAuthentication, NetworkAuthentication, ServiceProfile, TrafficSplit |\n| `pkg/utils` | Shared utility — REST config helper used by all domain packages |\n| `pkg/velero` | Helpers for Velero Backup, Restore, Schedule, BackupStorageLocation |\n\n## Purpose\n\nThese helpers are intended to:\n\n- Accelerate writing integration tests for Kubernetes platforms\n- Provide reusable checks for resource readiness and correctness\n- Help ensure deployments are successful and meet expected criteria\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcollom%2Fterratest-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcollom%2Fterratest-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcollom%2Fterratest-utils/lists"}