Skip to content

v1.7.0

Compare
Choose a tag to compare
@github-actions github-actions released this 05 Mar 15:33
· 47 commits to main since this release

NOTES:

  • helper/resource: Error messages generated by the testing logic, which were updated for clarity in this release, are not protected by compatibility promises. While testing logic errors are usable in certain scenarios with ErrorCheck and ExpectError functionality, error messaging checks should be based on provider-controlled messaging or when appropriate to use other testing features such as ExpectNonEmptyPlan instead. (#238)
  • Numerical values in the plan are now represented as json.Number, not float64. Custom plan checks relying upon float64 representation may need altering (#248)
  • plancheck: Deprecated ExpectNullOutputValue and ExpectNullOutputValueAtPath. Use ExpectKnownOutputValue and ExpectKnownOutputValueAtPath with knownvalue.Null instead (#275)
  • plancheck: ExpectKnownValue, ExpectKnownOutputValue and ExpectKnownOutputValueAtPath plan checks are considered experimental and may be altered or removed in a subsequent release (#276)
  • statecheck: ExpectKnownValue, ExpectKnownOutputValue and ExpectKnownOutputValueAtPath state checks are considered experimental and may be altered or removed in a subsequent release (#276)
  • knownvalue: The knownvalue package is considered experimental and may be altered or removed in a subsequent release (#276)
  • all: This Go module has been updated to Go 1.21 per the Go support policy. It is recommended to review the Go 1.21 release notes before upgrading. Any consumers building on earlier Go versions may experience errors (#300)

FEATURES:

  • plancheck: Added ExpectKnownValue plan check, which asserts that a given resource attribute has a defined type, and value (#248)
  • plancheck: Added ExpectKnownOutputValue plan check, which asserts that a given output value has a defined type, and value (#248)
  • plancheck: Added ExpectKnownOutputValueAtPath plan check, which asserts that a given output value at a specified path has a defined type, and value (#248)
  • knownvalue: Introduced new knownvalue package which contains types for working with plan checks and state checks (#248)
  • statecheck: Introduced new statecheck package with interface and built-in state check functionality (#275)
  • statecheck: Added ExpectKnownValue state check, which asserts that a given resource attribute has a defined type, and value (#275)
  • statecheck: Added ExpectKnownOutputValue state check, which asserts that a given output value has a defined type, and value (#275)
  • statecheck: Added ExpectKnownOutputValueAtPath plan check, which asserts that a given output value at a specified path has a defined type, and value (#275)
  • statecheck: Added ExpectSensitiveValue built-in state check, which asserts that a given attribute has a sensitive value (#275)

BUG FIXES:

  • helper/resource: Clarified error messaging from testing failures, especially when using TestStep.PlanOnly: true (#238)
  • helper/resource: Fix detection of provider block declaration in Config, ConfigDirectory, and ConfigFile (#265)
  • helper/resource: Fix detection of terraform block declaration in Config, ConfigDirectory, and ConfigFile (#265)
  • helper/resource: Fixed internal deferred test helpers to properly report file and line information in test failures. (#292)