terraform/internal/command/views
Sarah French ab6e4f2299
Refactor JUnit XML output of terraform test into a new junit package (#36304)
* Refactor JUnit XML output to use new concept of an Artifact

* Move JUnit-related code into new `artifact` package

* Refactor Artifact's Save method to return diagnostics, update comments

Previously TestJUnitXMLFile implemented the View interface, which cannot return errors. Now it's not a View any more we can simplify things.

* Make junitXMLTestReport output deterministic by iterating over a slice instead of a map, add test

* Provide sources to junitXMLTestReport, allowing complete error messages in the XML

We need to ensure that artifact.NewTestJUnitXMLFile is called once the config Loader is available as a non-nil pointer

* Whitespace

* Add some test coverage for JUnit XML output for `terraform test`

* Refactor how file is saved, add tests

* Move XML structs definitions outside of `junitXMLTestReport`

* Fix nil pointer bug

* Add missing file headers

* Refactor comparison of byte slices

* Rename package to `junit`, rename structs to match

* Add a test showing JUnit output when a test is skipped by the user
2025-01-13 13:25:58 +00:00
..
json logging: add trace statements when changes are ignored (#36259) 2025-01-03 11:28:19 +01:00
testdata Fix saved plan test regressions, fixtures 2023-07-25 10:22:46 -04:00
apply.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
apply_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
cloud.go Revert "Merge pull request #35929 from bschaatsbergen/b/fix-retry-messages-in-cloud-backend-json" 2024-11-13 18:22:26 -07:00
hook_count.go Refactor terraform.Hook to use a resource-identifying wrapper struct 2024-02-27 19:28:20 -08:00
hook_count_test.go Refactor terraform.Hook to use a resource-identifying wrapper struct 2024-02-27 19:28:20 -08:00
hook_json.go create a ui hook for unknown ephemeral config 2024-11-06 13:56:20 -05:00
hook_json_test.go command/views: Fix flaky hook tests (#36104) 2024-12-09 10:23:55 +00:00
hook_ui.go create a ui hook for unknown ephemeral config 2024-11-06 13:56:20 -05:00
hook_ui_test.go command/views: Fix flaky hook tests (#36104) 2024-12-09 10:23:55 +00:00
init.go Revert "Merge pull request #35929 from bschaatsbergen/b/fix-retry-messages-in-cloud-backend-json" 2024-11-13 18:22:26 -07:00
init_test.go making json data more useful for client consumption 2024-04-17 12:26:23 -04:00
json_view.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
json_view_test.go fixing tests internal/command/init, view and argumento 2024-04-17 12:26:23 -04:00
modules.go cmd/modules: Ensure modules are sorted by reference key (#36268) 2025-01-06 15:25:24 +00:00
operation.go terraform: Plans can be "complete" and "applyable" 2024-02-09 09:24:27 -08:00
operation_test.go update changes in command pkgs 2024-08-22 09:39:37 -04:00
output.go Remove handling of ephemeral root outputs (#35809) 2024-10-03 18:10:30 +01:00
output_test.go Remove handling of ephemeral root outputs (#35809) 2024-10-03 18:10:30 +01:00
plan.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
plan_test.go update changes in command pkgs 2024-08-22 09:39:37 -04:00
refresh.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
refresh_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
show.go terraform: Plans can be "complete" and "applyable" 2024-02-09 09:24:27 -08:00
show_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
state_locker.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
test.go Refactor JUnit XML output of terraform test into a new junit package (#36304) 2025-01-13 13:25:58 +00:00
test_test.go update changes in command pkgs 2024-08-22 09:39:37 -04:00
validate.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
validate_test.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
view.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00