Commit graph

7 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
hashicorp-copywrite[bot]
53c34ff49c
Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
Liam Cervante
e1019b3641
testing framework: validate the configuration before terraform test (#33559)
* testing framework: call validate on the configuration before running terraform test

* address comments

* make tests pass after merge

* fix tests
2023-07-26 10:56:44 +02:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
Martin Atkins
ffe056bacb Move command/ to internal/command/
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00
Renamed from command/arguments/validate_test.go (Browse further)