Skip to content

Commit

Permalink
kubetest: also gather junit reports in case of errors observed from g…
Browse files Browse the repository at this point in the history
…inkgo
  • Loading branch information
chrischdi authored and k8s-infra-cherrypick-robot committed Apr 23, 2024
1 parent 877d16c commit d7f48ec
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 d7f48ec

Please sign in to comment.