Skip to content

Commit

Permalink
Merge pull request #10494 from k8s-infra-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-10493-to-release-1.7

[release-1.7] 🐛 kubetest: also gather junit reports in case of errors observed from ginkgo
  • Loading branch information
k8s-ci-robot committed Apr 23, 2024
2 parents 877d16c + d7f48ec commit ef04465
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 ef04465

Please sign in to comment.