diff --git a/.changes/1.7.0.md b/.changes/1.7.0.md new file mode 100644 index 000000000..7695ad966 --- /dev/null +++ b/.changes/1.7.0.md @@ -0,0 +1,31 @@ +## 1.7.0 (March 05, 2024) + +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](https://github.com/hashicorp/terraform-plugin-testing/issues/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](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Deprecated `ExpectNullOutputValue` and `ExpectNullOutputValueAtPath`. Use `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` with `knownvalue.Null` instead ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* plancheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` plan checks are considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* statecheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` state checks are considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* knownvalue: The `knownvalue` package is considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* all: This Go module has been updated to Go 1.21 per the [Go support policy](https://go.dev/doc/devel/release#policy). It is recommended to review the [Go 1.21 release notes](https://go.dev/doc/go1.21) before upgrading. Any consumers building on earlier Go versions may experience errors ([#300](https://github.com/hashicorp/terraform-plugin-testing/issues/300)) + +FEATURES: + +* plancheck: Added `ExpectKnownValue` plan check, which asserts that a given resource attribute has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Added `ExpectKnownOutputValue` plan check, which asserts that a given output value has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts that a given output value at a specified path has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* knownvalue: Introduced new `knownvalue` package which contains types for working with plan checks and state checks ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* statecheck: Introduced new `statecheck` package with interface and built-in state check functionality ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownValue` state check, which asserts that a given resource attribute has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownOutputValue` state check, which asserts that a given output value has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts that a given output value at a specified path has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectSensitiveValue` built-in state check, which asserts that a given attribute has a sensitive value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) + +BUG FIXES: + +* helper/resource: Clarified error messaging from testing failures, especially when using `TestStep.PlanOnly: true` ([#238](https://github.com/hashicorp/terraform-plugin-testing/issues/238)) +* helper/resource: Fix detection of provider block declaration in `Config`, `ConfigDirectory`, and `ConfigFile` ([#265](https://github.com/hashicorp/terraform-plugin-testing/issues/265)) +* helper/resource: Fix detection of terraform block declaration in `Config`, `ConfigDirectory`, and `ConfigFile` ([#265](https://github.com/hashicorp/terraform-plugin-testing/issues/265)) +* helper/resource: Fixed internal deferred test helpers to properly report file and line information in test failures. ([#292](https://github.com/hashicorp/terraform-plugin-testing/issues/292)) + diff --git a/.changes/unreleased/BUG FIXES-20231205-142936.yaml b/.changes/unreleased/BUG FIXES-20231205-142936.yaml deleted file mode 100644 index 1dc0538e9..000000000 --- a/.changes/unreleased/BUG FIXES-20231205-142936.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: BUG FIXES -body: 'helper/resource: Clarified error messaging from testing failures, especially - when using `TestStep.PlanOnly: true`' -time: 2023-12-05T14:29:36.098289-05:00 -custom: - Issue: "238" diff --git a/.changes/unreleased/BUG FIXES-20240108-154019.yaml b/.changes/unreleased/BUG FIXES-20240108-154019.yaml deleted file mode 100644 index c05118459..000000000 --- a/.changes/unreleased/BUG FIXES-20240108-154019.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: BUG FIXES -body: 'helper/resource: Fix detection of provider block declaration in `Config`, - `ConfigDirectory`, and `ConfigFile`' -time: 2024-01-08T15:40:19.089652Z -custom: - Issue: "265" diff --git a/.changes/unreleased/BUG FIXES-20240108-170824.yaml b/.changes/unreleased/BUG FIXES-20240108-170824.yaml deleted file mode 100644 index 257884622..000000000 --- a/.changes/unreleased/BUG FIXES-20240108-170824.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: BUG FIXES -body: 'helper/resource: Fix detection of terraform block declaration in `Config`, - `ConfigDirectory`, and `ConfigFile`' -time: 2024-01-08T17:08:24.219063Z -custom: - Issue: "265" diff --git a/.changes/unreleased/BUG FIXES-20240229-095804.yaml b/.changes/unreleased/BUG FIXES-20240229-095804.yaml deleted file mode 100644 index 0db59ca8c..000000000 --- a/.changes/unreleased/BUG FIXES-20240229-095804.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: BUG FIXES -body: 'helper/resource: Fixed internal deferred test helpers to properly report file - and line information in test failures.' -time: 2024-02-29T09:58:04.443444-05:00 -custom: - Issue: "292" diff --git a/.changes/unreleased/FEATURES-20231218-114539.yaml b/.changes/unreleased/FEATURES-20231218-114539.yaml deleted file mode 100644 index 97567a488..000000000 --- a/.changes/unreleased/FEATURES-20231218-114539.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'plancheck: Added `ExpectKnownValue` plan check, which asserts that a given - resource attribute has a defined type, and value' -time: 2023-12-18T11:45:39.181954Z -custom: - Issue: "248" diff --git a/.changes/unreleased/FEATURES-20231218-114553.yaml b/.changes/unreleased/FEATURES-20231218-114553.yaml deleted file mode 100644 index 3627c9eee..000000000 --- a/.changes/unreleased/FEATURES-20231218-114553.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'plancheck: Added `ExpectKnownOutputValue` plan check, which asserts that a - given output value has a defined type, and value' -time: 2023-12-18T11:45:53.272412Z -custom: - Issue: "248" diff --git a/.changes/unreleased/FEATURES-20231218-114611.yaml b/.changes/unreleased/FEATURES-20231218-114611.yaml deleted file mode 100644 index 09fe1d9dc..000000000 --- a/.changes/unreleased/FEATURES-20231218-114611.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'plancheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts that - a given output value at a specified path has a defined type, and value' -time: 2023-12-18T11:46:11.58053Z -custom: - Issue: "248" diff --git a/.changes/unreleased/FEATURES-20231218-114739.yaml b/.changes/unreleased/FEATURES-20231218-114739.yaml deleted file mode 100644 index 85498d64a..000000000 --- a/.changes/unreleased/FEATURES-20231218-114739.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'knownvalue: Introduced new `knownvalue` package which contains types for working - with plan checks and state checks' -time: 2023-12-18T11:47:39.059813Z -custom: - Issue: "248" diff --git a/.changes/unreleased/FEATURES-20240111-142126.yaml b/.changes/unreleased/FEATURES-20240111-142126.yaml deleted file mode 100644 index b89fcbddc..000000000 --- a/.changes/unreleased/FEATURES-20240111-142126.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'statecheck: Introduced new `statecheck` package with interface and built-in - state check functionality' -time: 2024-01-11T14:21:26.261094Z -custom: - Issue: "275" diff --git a/.changes/unreleased/FEATURES-20240111-142223.yaml b/.changes/unreleased/FEATURES-20240111-142223.yaml deleted file mode 100644 index 049bb81f9..000000000 --- a/.changes/unreleased/FEATURES-20240111-142223.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'statecheck: Added `ExpectKnownValue` state check, which asserts that a given - resource attribute has a defined type, and value' -time: 2024-01-11T14:22:23.072321Z -custom: - Issue: "275" diff --git a/.changes/unreleased/FEATURES-20240111-142314.yaml b/.changes/unreleased/FEATURES-20240111-142314.yaml deleted file mode 100644 index 3b602ef44..000000000 --- a/.changes/unreleased/FEATURES-20240111-142314.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'statecheck: Added `ExpectKnownOutputValue` state check, which asserts that - a given output value has a defined type, and value' -time: 2024-01-11T14:23:14.025585Z -custom: - Issue: "275" diff --git a/.changes/unreleased/FEATURES-20240111-142353.yaml b/.changes/unreleased/FEATURES-20240111-142353.yaml deleted file mode 100644 index 2db803bd6..000000000 --- a/.changes/unreleased/FEATURES-20240111-142353.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'statecheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts - that a given output value at a specified path has a defined type, and value' -time: 2024-01-11T14:23:53.633255Z -custom: - Issue: "275" diff --git a/.changes/unreleased/FEATURES-20240111-142544.yaml b/.changes/unreleased/FEATURES-20240111-142544.yaml deleted file mode 100644 index c8a02b9fd..000000000 --- a/.changes/unreleased/FEATURES-20240111-142544.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: FEATURES -body: 'statecheck: Added `ExpectSensitiveValue` built-in state check, which asserts - that a given attribute has a sensitive value' -time: 2024-01-11T14:25:44.598583Z -custom: - Issue: "275" diff --git a/.changes/unreleased/NOTES-20231205-143152.yaml b/.changes/unreleased/NOTES-20231205-143152.yaml deleted file mode 100644 index 02a73ce2b..000000000 --- a/.changes/unreleased/NOTES-20231205-143152.yaml +++ /dev/null @@ -1,10 +0,0 @@ -kind: NOTES -body: '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.' -time: 2023-12-05T14:31:52.574105-05:00 -custom: - Issue: "238" diff --git a/.changes/unreleased/NOTES-20240104-083841.yaml b/.changes/unreleased/NOTES-20240104-083841.yaml deleted file mode 100644 index e281b21b6..000000000 --- a/.changes/unreleased/NOTES-20240104-083841.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: NOTES -body: Numerical values in the plan are now represented as json.Number, not float64. - Custom plan checks relying upon float64 representation may need altering -time: 2024-01-04T08:38:41.645745Z -custom: - Issue: "248" diff --git a/.changes/unreleased/NOTES-20240122-082628.yaml b/.changes/unreleased/NOTES-20240122-082628.yaml deleted file mode 100644 index 09792a709..000000000 --- a/.changes/unreleased/NOTES-20240122-082628.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: NOTES -body: 'plancheck: Deprecated `ExpectNullOutputValue` and `ExpectNullOutputValueAtPath`. - Use `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` with - `knownvalue.Null` instead' -time: 2024-01-22T08:26:28.053303Z -custom: - Issue: "275" diff --git a/.changes/unreleased/NOTES-20240229-112244.yaml b/.changes/unreleased/NOTES-20240229-112244.yaml deleted file mode 100644 index 0dbed4b45..000000000 --- a/.changes/unreleased/NOTES-20240229-112244.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: NOTES -body: 'plancheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` - plan checks are considered experimental and may be altered or removed in a subsequent release' -time: 2024-02-29T11:22:44.292647Z -custom: - Issue: "276" diff --git a/.changes/unreleased/NOTES-20240229-112333.yaml b/.changes/unreleased/NOTES-20240229-112333.yaml deleted file mode 100644 index 6076d9415..000000000 --- a/.changes/unreleased/NOTES-20240229-112333.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: NOTES -body: 'statecheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` - state checks are considered experimental and may be altered or removed in a subsequent release' -time: 2024-02-29T11:23:33.77075Z -custom: - Issue: "276" diff --git a/.changes/unreleased/NOTES-20240229-112401.yaml b/.changes/unreleased/NOTES-20240229-112401.yaml deleted file mode 100644 index 15df58a3f..000000000 --- a/.changes/unreleased/NOTES-20240229-112401.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: NOTES -body: 'knownvalue: The `knownvalue` package is considered experimental and may - be altered or removed in a subsequent release' -time: 2024-02-29T11:24:01.600093Z -custom: - Issue: "276" diff --git a/.changes/unreleased/NOTES-20240305-111036.yaml b/.changes/unreleased/NOTES-20240305-111036.yaml deleted file mode 100644 index 004a7ef79..000000000 --- a/.changes/unreleased/NOTES-20240305-111036.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: NOTES -body: 'all: This Go module has been updated to Go 1.21 per the [Go support policy](https://go.dev/doc/devel/release#policy). - It is recommended to review the [Go 1.21 release notes](https://go.dev/doc/go1.21) before upgrading. Any consumers - building on earlier Go versions may experience errors' -time: 2024-03-05T11:10:36.642947Z -custom: - Issue: "300" diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d20127d..47b8e8b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,34 @@ +## 1.7.0 (March 05, 2024) + +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](https://github.com/hashicorp/terraform-plugin-testing/issues/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](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Deprecated `ExpectNullOutputValue` and `ExpectNullOutputValueAtPath`. Use `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` with `knownvalue.Null` instead ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* plancheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` plan checks are considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* statecheck: `ExpectKnownValue`, `ExpectKnownOutputValue` and `ExpectKnownOutputValueAtPath` state checks are considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* knownvalue: The `knownvalue` package is considered experimental and may be altered or removed in a subsequent release ([#276](https://github.com/hashicorp/terraform-plugin-testing/issues/276)) +* all: This Go module has been updated to Go 1.21 per the [Go support policy](https://go.dev/doc/devel/release#policy). It is recommended to review the [Go 1.21 release notes](https://go.dev/doc/go1.21) before upgrading. Any consumers building on earlier Go versions may experience errors ([#300](https://github.com/hashicorp/terraform-plugin-testing/issues/300)) + +FEATURES: + +* plancheck: Added `ExpectKnownValue` plan check, which asserts that a given resource attribute has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Added `ExpectKnownOutputValue` plan check, which asserts that a given output value has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* plancheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts that a given output value at a specified path has a defined type, and value ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* knownvalue: Introduced new `knownvalue` package which contains types for working with plan checks and state checks ([#248](https://github.com/hashicorp/terraform-plugin-testing/issues/248)) +* statecheck: Introduced new `statecheck` package with interface and built-in state check functionality ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownValue` state check, which asserts that a given resource attribute has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownOutputValue` state check, which asserts that a given output value has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectKnownOutputValueAtPath` plan check, which asserts that a given output value at a specified path has a defined type, and value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) +* statecheck: Added `ExpectSensitiveValue` built-in state check, which asserts that a given attribute has a sensitive value ([#275](https://github.com/hashicorp/terraform-plugin-testing/issues/275)) + +BUG FIXES: + +* helper/resource: Clarified error messaging from testing failures, especially when using `TestStep.PlanOnly: true` ([#238](https://github.com/hashicorp/terraform-plugin-testing/issues/238)) +* helper/resource: Fix detection of provider block declaration in `Config`, `ConfigDirectory`, and `ConfigFile` ([#265](https://github.com/hashicorp/terraform-plugin-testing/issues/265)) +* helper/resource: Fix detection of terraform block declaration in `Config`, `ConfigDirectory`, and `ConfigFile` ([#265](https://github.com/hashicorp/terraform-plugin-testing/issues/265)) +* helper/resource: Fixed internal deferred test helpers to properly report file and line information in test failures. ([#292](https://github.com/hashicorp/terraform-plugin-testing/issues/292)) + ## 1.6.0 (December 04, 2023) NOTES: