Zum Inhalt springen

Terratest Updates & Release Notes

3 Einträge aus 1 Quelle. Zuletzt aktualisiert:

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Terratest von Gruntwork

Terratest v2.0.0: Erstes stabiles v2-Release mit 16 Go-Modulen

Terratest v2.0.0 ist das erste stabile v2-Release, bei dem alle 16 Go-Module unter /v2-Importpfaden einzeln installierbar sind, sodass Tests nur die SDKs der tatsächlich importierten Module laden, während der Umstieg von v1 hauptsächlich das Umschreiben von Imports erfordert und v1 noch 12 Monate lang nur Sicherheitskorrekturen erhält.

Terratest v2.0.0 is the first stable release of v2. All 16 modules are tagged at v2.0.0 in lockstep, and each one installs on its own.

TL;DR: Terratest is now 16 Go modules under /v2 import paths, so a test pulls in only the SDKs of the modules it imports. Most of the upgrade from v1 is rewriting imports, and the compiler finds every other change except two Kubernetes behavior changes, listed below. v1 gets security fixes only, for 12 months after this release.

Upgrading from v1

The v2 migration guide walks through the whole move. What changes for a v1 user:

  • Import paths: every module moves to github.com/gruntwork-io/terratest/modules/<name>/v2. The rewriting imports page has the sed commands, and the cases a blind find and replace gets wrong.
  • Utility packages: random, files, logger, shell, retry and testing now live in core/v2.
  • Package names: http-helper, dns-helper and test-structure become httphelper, dnshelper and teststructure, in the import path and in the identifier.
  • Deprecated helpers removed: code still calling terraform.Apply calls terraform.ApplyContext(t, ctx, ...) instead, which is the replacement the v1 deprecation warnings already named. …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Terratest von Gruntwork

Terratest v2.0.0-beta.2: Funktionen aus teststructure verschoben

Terratest v2.0.0-beta.2 verschiebt acht Funktionen von teststructure in die Module aws, k8s, packer und ssh (Breaking Change) und verkleinert dadurch die Abhängigkeitsgraphen deutlich, etwa von 301 auf 104 go.sum-Zeilen bei teststructure.

Terratest v2 lockstep release. All 16 submodules are tagged at v2.0.0-beta.2.

Breaking changes

Eight functions moved to the module that owns the type they operate on, so teststructure no longer pulls in aws, k8s, packer and ssh (#1877). Signatures and on-disk filenames are unchanged, so every call site is a compile error and go build ./... finds all of them.

beta.1 beta.2
teststructure.{Save,Load}Ec2KeyPair aws.{Save,Load}Ec2KeyPair
teststructure.{Save,Load}KubectlOptions k8s.{Save,Load}KubectlOptions
teststructure.{Save,Load}PackerOptions packer.{Save,Load}PackerOptions
teststructure.{Save,Load}SSHKeyPair ssh.{Save,Load}SSHKeyPair

Nothing else moved. RunTestStage, the Terraform helpers, SaveString/LoadString and the generic SaveTestData/LoadTestData all stay put.

Smaller dependency graph

This closes #1875, which reported that the v2 split was undercut by teststructure requiring seven modules and k8s requiring aws for a single call.

module beta.1 beta.2
teststructure 301 104
k8s 259 160
helm 316 219

go.sum lines. k8s and helm no longer carry any aws-sdk-go-v2 entries; importing teststructure for RunTestStage no longer pulls in the AWS SDK or client-go.

Behavior changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Terratest von Gruntwork

Terratest v2.0.0-beta.1: Aufteilung in 16 unabhängige Go-Module

Terratest v2.0.0-beta.1 teilt die Bibliothek in 16 unabhängige Go-Module unter /v2-Importpfaden auf, entfernt veraltete APIs und Hilfspakete, benennt Pakete in httphelper, dnshelper und teststructure um und setzt mindestens Go 1.26 voraus.

This is the first beta of Terratest v2. It splits the library into 16 independent Go modules under /v2 import paths and completes the v2 API cutdown. This is a prerelease published for soak testing ahead of v2.0.0.

This release covers all 16 v2 modules. It is anchored to the core tag, but every module listed under Install below is tagged at v2.0.0-beta.1 and independently installable. This is not a core-only release.

✨ Highlights

  • Modularization into 16 independent modules. Every domain is now its own Go module at github.com/gruntwork-io/terratest/modules/<name>/v2. Consumers fetch and version each module independently and pull only its dependency closure. (addresses #445 and #1492)
  • Smaller dependency and CVE surface. A consumer that only uses the AWS helpers drops from a 332-line go.sum to 72, a 78% reduction, with zero Kubernetes, Azure, or GCP SDKs in the build. If you do not import modules/k8s/v2, the Kubernetes client and its CVEs (#1071, #1072, #1391) are simply not present.
  • API cutdown. Removed the cmd/ binaries, the collections / environment / git core utilities, version-checker, slack, and every v1 // Deprecated: alias.
  • Idiomatic package names. http-helper becomes httphelper, dns-helper becomes dnshelper, test-structure becomes teststructure.
  • Minimum Go 1.26.

⚠️ Breaking Changes

/v2 import paths (every module) …

Originalquelle(öffnet in neuem Tab)Problem melden