This repository was archived by the owner on May 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed
Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 11# Copyright Jetstack Ltd. See LICENSE for details.
2- BINDIR ?= $(CURDIR ) /bin
3- HACK_DIR ?= hack
4- PATH := $(BINDIR ) :$(PATH )
2+ BINDIR ?= $(CURDIR ) /bin
3+ HACK_DIR ?= hack
4+ PATH := $(BINDIR ) :$(PATH )
5+ ARTIFACTS ?= artifacts
56
67export GO111MODULE =on
78
@@ -83,12 +84,12 @@ generate: depend ## generates mocks and assets files
8384 go generate $$(go list ./pkg/... ./cmd/... )
8485
8586test : generate verify # # run all go tests
86- mkdir -p artifacts
87- go test -v -bench $$(go list ./pkg/... ./cmd/... | grep -v pkg/e2e ) | tee artifacts /go-test.stdout
88- cat artifacts /go-test.stdout | go run github.com/jstemmer/go-junit-report > artifacts /junit-go-test.xml
87+ mkdir -p $( ARTIFACTS )
88+ go test -v -bench $$(go list ./pkg/... ./cmd/... | grep -v pkg/e2e ) | tee $( ARTIFACTS ) /go-test.stdout
89+ cat $( ARTIFACTS ) /go-test.stdout | go run github.com/jstemmer/go-junit-report > $( ARTIFACTS ) /junit-go-test.xml
8990
9091e2e : # # run end to end tests
91- mkdir -p artifacts
92+ mkdir -p $( ARTIFACTS )
9293 KUBE_OIDC_PROXY_ROOT_PATH=" $$ (pwd)" go test -timeout 30m -v --count=1 ./test/e2e/suite/.
9394
9495build : generate # # build kube-oidc-proxy
Original file line number Diff line number Diff line change 22package suite
33
44import (
5+ "os"
6+ "path/filepath"
57 "testing"
68 "time"
79
@@ -28,6 +30,14 @@ func init() {
2830func TestE2E (t * testing.T ) {
2931 gomega .RegisterFailHandler (ginkgo .Fail )
3032
31- junitReporter := reporters .NewJUnitReporter ("../../../artifacts/junit-go-e2e.xml" )
33+ junitPath := "../../../artifacts"
34+ if path := os .Getenv ("ARTIFACTS" ); path != "" {
35+ junitPath = path
36+ }
37+
38+ junitReporter := reporters .NewJUnitReporter (filepath .Join (
39+ junitPath ,
40+ "junit-go-e2e.xml" ,
41+ ))
3242 ginkgo .RunSpecsWithDefaultAndCustomReporters (t , "kube-oidc-proxy e2e suite" , []ginkgo.Reporter {junitReporter })
3343}
You can’t perform that action at this time.
0 commit comments