diff --git a/pkg/certsuite/certsuite.go b/pkg/certsuite/certsuite.go index 5b679e50d6..8e8bba70ce 100644 --- a/pkg/certsuite/certsuite.go +++ b/pkg/certsuite/certsuite.go @@ -123,9 +123,12 @@ func Run(labelsFilter, outputFolder string) error { // Marshal the claim and output to file claimBuilder.Build(claimOutputFile) + // Write the file to the flag output-dir + outputFile := *flags.OutputDir + "/" + junitXMLOutputFile + if configuration.GetTestParameters().EnableXMLCreation { - log.Info("XML file creation is enabled. Creating JUnit XML file: %s", junitXMLOutputFile) - claimBuilder.ToJUnitXML(junitXMLOutputFile, startTime, endTime) + log.Info("XML file creation is enabled. Creating JUnit XML file: %s", outputFile) + claimBuilder.ToJUnitXML(outputFile, startTime, endTime) } // Send claim file to the collector if specified by env var