diff --git a/hack/run-e2e-conformance.sh b/hack/run-e2e-conformance.sh index 529993863..01eb254bf 100755 --- a/hack/run-e2e-conformance.sh +++ b/hack/run-e2e-conformance.sh @@ -8,14 +8,14 @@ if [ $? -ne 0 ]; then GINKGO_TMP_DIR=$(mktemp -d) cd $GINKGO_TMP_DIR go mod init tmp - go install -mod=readonly github.com/onsi/ginkgo/ginkgo@v1.16.5 + go install -mod=readonly github.com/onsi/ginkgo/v2/ginkgo@v2.5.0 rm -rf $GINKGO_TMP_DIR echo "Downloading ginkgo tool" cd - fi GOPATH="${GOPATH:-~/go}" -JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts/unit_report.xml}" +JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts}" export PATH=$PATH:$GOPATH/bin -GOFLAGS=-mod=vendor ginkgo "$SUITE" -- -junit $JUNIT_OUTPUT +GOFLAGS=-mod=vendor ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" "$SUITE" diff --git a/test/conformance/test_suite_test.go b/test/conformance/test_suite_test.go index 2ebe2e8c4..75ef4a122 100644 --- a/test/conformance/test_suite_test.go +++ b/test/conformance/test_suite_test.go @@ -21,25 +21,18 @@ import ( ) var ( - junitPath *string dumpOutput *bool reporterFile string customReporter *k8sreporter.KubernetesReporter ) func init() { - junitPath = flag.String("junit", "junit.xml", "the path for the junit format report") dumpOutput = flag.Bool("dump", false, "dump informations for failed tests") } func TestTest(t *testing.T) { RegisterFailHandler(Fail) - _, reporterConfig := GinkgoConfiguration() - if junitPath != nil { - reporterConfig.JUnitReport = *junitPath - } - reporterFile = os.Getenv("REPORTER_OUTPUT") clients := testclient.New("") @@ -56,7 +49,7 @@ func TestTest(t *testing.T) { customReporter = k8sreporter.New(clients, os.Stdout) } - RunSpecs(t, "SRIOV Operator conformance tests", reporterConfig) + RunSpecs(t, "SRIOV Operator conformance tests") } var _ = ReportAfterEach(func(sr types.SpecReport) { diff --git a/test/validation/test_suite_test.go b/test/validation/test_suite_test.go index 5093d8747..861338ae6 100644 --- a/test/validation/test_suite_test.go +++ b/test/validation/test_suite_test.go @@ -19,25 +19,18 @@ import ( ) var ( - junitPath *string dumpOutput *bool reporterFile string customReporter *k8sreporter.KubernetesReporter ) func init() { - junitPath = flag.String("junit", "junit.xml", "the path for the junit format report") dumpOutput = flag.Bool("dump", false, "dump informations for failed tests") } func TestTest(t *testing.T) { RegisterFailHandler(Fail) - _, reporterConfig := GinkgoConfiguration() - if junitPath != nil { - reporterConfig.JUnitReport = *junitPath - } - reporterFile = os.Getenv("REPORTER_OUTPUT") clients := testclient.New("") @@ -54,7 +47,7 @@ func TestTest(t *testing.T) { customReporter = k8sreporter.New(clients, os.Stdout) } - RunSpecs(t, "SRIOV Operator validation tests", reporterConfig) + RunSpecs(t, "SRIOV Operator validation tests") } var _ = ReportAfterEach(func(sr types.SpecReport) {