Commit graph

4 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Sarah French
85b482e05a
Add testing helpers that allow comparing diagnostics, refactor existing tests to use them. (#36456)
* Add testing helpers for comparing diagnostics with different levels of stringency

* Refactor some existing tests to use the new helpers

* Replace use of diag comparison test helpers in terraform package

* Add header

* Add return statement back in ephemeral test

* Update internal/terraform/context_plan2_test.go
2025-02-19 13:59:29 +00:00
Sarah French
b16a50973f
Add reusable Diagnostic comparer to tfdiags package (#36385)
* Add `DiagnosticComparer` to standardize how diagnostics are compared for equality. This uses code originally in the s3 backend.

Co-authored-by: Graham Davison <gdavison@hashicorp.com>

* Refactor `test` related code to use new comparer

* Refactor `s3` related code to use new comparer

* Replace use of reflect and go-spew with new diagnostics comparison approach

* Fix whitespace

* Make `tfdiags.DiagnosticComparer` a var

* Fix DiagnosticComparer test

---------

Co-authored-by: Graham Davison <gdavison@hashicorp.com>
2025-01-22 17:44:16 +00:00
Sebastian Rivera
a5294c2096 Impl tests for the modules command 2024-10-28 13:31:09 -04:00