Joël Stemmer
075629ad5f
junit: Add Testsuites.WriteXML method
2022-09-30 23:04:10 +01:00
Joël Stemmer
9b4f5520f7
Add test for reports without properties
2022-09-27 21:51:00 +01:00
Greg Dennis
39473dc54e
go-junit-report_test should fail if no files found
...
Today, if the testdata directory isn't present, this test trivially passes. This makes it fail when no files are found.
2022-08-19 10:55:25 -04:00
Joël Stemmer
0fc43a220a
internal/gojunitreport: Refactor testFileConfig to drop else block
2022-08-13 20:48:36 +01:00
Joël Stemmer
7fde4641ac
Use ioutil package for compatibility with Go 1.13
...
We specify 1.13 in go.mod, so we should make sure it can be built and
tested on that version. Let's keep using the ioutil package for now,
since it was only deprecated from 1.16.
2022-07-01 22:53:57 +01:00
Joël Stemmer
395886ab94
Revert "internal: make timestampFunc private"
...
This reverts commit dcbbd9fb228a8ac978f04dbb1d66570942bd24ba and fixes
testdata/generate-golden-reports.go.
2022-05-22 20:56:39 +01:00
Joël Stemmer
9ad16898a8
Add -subtest-mode flag to configure SubtestMode
2022-05-22 00:44:20 +01:00
Joël Stemmer
b4847b2e36
internal: move gotest.Options creation into separate function
...
The gotest and gojson parsers use the same options (for now). To avoid
duplication the list of parser options is created in a separate
function.
2022-05-21 22:44:38 +01:00
Joël Stemmer
dcbbd9fb22
internal: make timestampFunc private
2022-05-21 22:42:36 +01:00
Joël Stemmer
df7394c77c
Fix cmp.Diff argument order in tests
2022-05-13 21:45:38 +01:00
Joël Stemmer
4976b9b9ae
Strip testdata path from subtests name
2022-04-21 20:42:22 +01:00
Joël Stemmer
3260a9d2e0
Move common go-junit-report code into separate internal package
...
There was some code duplication between the go-junit-report binary, its
tests and the testdata/generate-golden script. This has been moved into
an internal package. The go-junit-report binary can now just focus on
flag parsing and validation, and it should be less likely that the
binary, tests and golden report generator behave differently.
2022-04-20 19:43:03 +01:00