mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-22 10:31:22 -04:00
* 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
16 lines
No EOL
829 B
XML
16 lines
No EOL
829 B
XML
<?xml version="1.0" encoding="UTF-8"?><testsuites>
|
|
<testsuite name="main.tftest.hcl" tests="1" skipped="0" failures="0" errors="1">
|
|
<testcase name="passes_validation" classname="main.tftest.hcl" time="TIME_REDACTED" timestamp="TIMESTAMP_REDACTED">
|
|
<error message="Encountered an error"><![CDATA[
|
|
Error: Provider configuration not present
|
|
|
|
To work with test_resource.secondary its original provider configuration at
|
|
provider["registry.terraform.io/hashicorp/test"].secondary is required, but it
|
|
has been removed. This occurs when a provider configuration is removed while
|
|
objects created by that provider still exist in the state. Re-add the provider
|
|
configuration to destroy test_resource.secondary, after which you can remove
|
|
the provider configuration again.
|
|
]]></error>
|
|
</testcase>
|
|
</testsuite>
|
|
</testsuites> |