mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-04 21:12:53 -05:00
Report stores a slice of Property structs rather than a map, to mimic JUnit properties, which have a deterministic ordering and allow multipler properties with the same name.
This commit is contained in:
@ -144,8 +144,8 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites {
|
||||
suite.SetTimestamp(pkg.Timestamp)
|
||||
}
|
||||
|
||||
for k, v := range pkg.Properties {
|
||||
suite.AddProperty(k, v)
|
||||
for _, p := range pkg.Properties {
|
||||
suite.AddProperty(p.Name, p.Value)
|
||||
}
|
||||
|
||||
if len(pkg.Output) > 0 {
|
||||
|
@ -19,7 +19,7 @@ func TestCreateFromReport(t *testing.T) {
|
||||
Duration: 1 * time.Second,
|
||||
Coverage: 0.9,
|
||||
Output: []string{"output"},
|
||||
Properties: map[string]string{"go.version": "go1.18"},
|
||||
Properties: []gtr.Property{{Name: "go.version", Value: "go1.18"}},
|
||||
Tests: []gtr.Test{
|
||||
{
|
||||
Name: "TestPass",
|
||||
|
Reference in New Issue
Block a user