From e9a41fc7c26291aa8fc4d18aff2bf2df2217f70d Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 16 Oct 2022 13:49:38 +0200 Subject: [PATCH] Add time to TestCase for #127 --- pkg/output/junit.go | 1 + pkg/output/junit_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/output/junit.go b/pkg/output/junit.go index 50d4e77..e9e358d 100644 --- a/pkg/output/junit.go +++ b/pkg/output/junit.go @@ -48,6 +48,7 @@ type TestCase struct { XMLName xml.Name `xml:"testcase"` Name string `xml:"name,attr"` ClassName string `xml:"classname,attr"` + Time int `xml:"time,attr"` // Optional, but for Buildkite support https://github.com/yannh/kubeconform/issues/127 Skipped *TestCaseSkipped `xml:"skipped,omitempty"` Error *TestCaseError `xml:"error,omitempty"` Failure []TestCaseError `xml:"failure,omitempty"` diff --git a/pkg/output/junit_test.go b/pkg/output/junit_test.go index c9ab96c..dd8e5b7 100644 --- a/pkg/output/junit_test.go +++ b/pkg/output/junit_test.go @@ -48,7 +48,7 @@ metadata: }, "\n" + " \n" + - " \n" + + " \n" + " \n" + "\n", }, @@ -81,7 +81,7 @@ metadata: }, "\n" + " \n" + - " \n" + + " \n" + " \n" + "\n", },