Skip to content

Commit

Permalink
Merge pull request #10493 from chrischdi/pr-kubetest-always-gather-junit
Browse files Browse the repository at this point in the history
🐛 kubetest: also gather junit reports in case of errors observed from ginkgo
  • Loading branch information
k8s-ci-robot committed Apr 23, 2024
2 parents 0b61de1 + df6c93e commit bcca273
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/framework/kubetest/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/onsi/ginkgo/v2"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/rand"
"k8s.io/client-go/discovery"
"k8s.io/client-go/tools/clientcmd"
Expand Down Expand Up @@ -204,7 +205,10 @@ func Run(ctx context.Context, input RunInput) error {
RestartPolicy: dockercontainer.RestartPolicyDisabled,
}, ginkgo.GinkgoWriter)
if err != nil {
return errors.Wrap(err, "Unable to run conformance tests")
return kerrors.NewAggregate([]error{
errors.Wrap(err, "Unable to run conformance tests"),
framework.GatherJUnitReports(reportDir, input.ArtifactsDirectory),
})
}
return framework.GatherJUnitReports(reportDir, input.ArtifactsDirectory)
}
Expand Down

0 comments on commit bcca273

Please sign in to comment.