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
17 lines
299 B
HCL
17 lines
299 B
HCL
terraform {
|
|
required_providers {
|
|
test = {
|
|
source = "hashicorp/test"
|
|
configuration_aliases = [test.secondary]
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "test_resource" "primary" {
|
|
value = "foo"
|
|
}
|
|
|
|
resource "test_resource" "secondary" {
|
|
provider = test.secondary
|
|
value = "bar"
|
|
}
|