terraform/internal/command/testdata/test/junit-output/multiple-files
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
..
expected-output.xml Refactor JUnit XML output of terraform test into a new junit package (#36304) 2025-01-13 13:25:58 +00:00
main.tf Refactor JUnit XML output of terraform test into a new junit package (#36304) 2025-01-13 13:25:58 +00:00
one.tftest.hcl Refactor JUnit XML output of terraform test into a new junit package (#36304) 2025-01-13 13:25:58 +00:00
two.tftest.hcl Refactor JUnit XML output of terraform test into a new junit package (#36304) 2025-01-13 13:25:58 +00:00