Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
2d0e5c18
Unverified
Commit
2d0e5c18
authored
Apr 08, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76282 from fabriziopandini/kubeadm-e2e-JUnitReporter
Add JUnitReporter to kubeadm e2e test
parents
87cf9727
0c4031f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
BUILD
test/e2e_kubeadm/BUILD
+2
-0
e2e_kubeadm_suite_test.go
test/e2e_kubeadm/e2e_kubeadm_suite_test.go
+17
-1
No files found.
test/e2e_kubeadm/BUILD
View file @
2d0e5c18
...
...
@@ -34,6 +34,8 @@ go_test(
"//staging/src/k8s.io/cluster-bootstrap/token/api:go_default_library",
"//test/e2e/framework:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/ginkgo/config:go_default_library",
"//vendor/github.com/onsi/ginkgo/reporters:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/gopkg.in/yaml.v2:go_default_library",
...
...
test/e2e_kubeadm/e2e_kubeadm_suite_test.go
View file @
2d0e5c18
...
...
@@ -18,13 +18,17 @@ package e2e_kubeadm
import
(
"flag"
"fmt"
"os"
"path/filepath"
"testing"
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
"github.com/onsi/gomega"
"github.com/spf13/pflag"
morereporters
"github.com/onsi/ginkgo/reporters"
"k8s.io/kubernetes/test/e2e/framework"
)
...
...
@@ -42,7 +46,19 @@ func TestMain(m *testing.M) {
}
func
TestE2E
(
t
*
testing
.
T
)
{
reporters
:=
[]
ginkgo
.
Reporter
{}
gomega
.
RegisterFailHandler
(
ginkgo
.
Fail
)
reporters
:=
[]
ginkgo
.
Reporter
{}
reportDir
:=
framework
.
TestContext
.
ReportDir
if
reportDir
!=
""
{
// Create the directory if it doesn't already exists
if
err
:=
os
.
MkdirAll
(
reportDir
,
0755
);
err
!=
nil
{
t
.
Fatalf
(
"Failed creating report directory: %v"
,
err
)
}
else
{
// Configure a junit reporter to write to the directory
junitFile
:=
fmt
.
Sprintf
(
"junit_%s_%02d.xml"
,
framework
.
TestContext
.
ReportPrefix
,
config
.
GinkgoConfig
.
ParallelNode
)
junitPath
:=
filepath
.
Join
(
reportDir
,
junitFile
)
reporters
=
append
(
reporters
,
morereporters
.
NewJUnitReporter
(
junitPath
))
}
}
ginkgo
.
RunSpecsWithDefaultAndCustomReporters
(
t
,
"E2EKubeadm suite"
,
reporters
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment