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 1
1
# 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
5
6
6
7
export GO111MODULE =on
7
8
@@ -83,12 +84,12 @@ generate: depend ## generates mocks and assets files
83
84
go generate $$(go list ./pkg/... ./cmd/... )
84
85
85
86
test : 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
89
90
90
91
e2e : # # run end to end tests
91
- mkdir -p artifacts
92
+ mkdir -p $( ARTIFACTS )
92
93
KUBE_OIDC_PROXY_ROOT_PATH=" $$ (pwd)" go test -timeout 30m -v --count=1 ./test/e2e/suite/.
93
94
94
95
build : generate # # build kube-oidc-proxy
Original file line number Diff line number Diff line change 2
2
package suite
3
3
4
4
import (
5
+ "os"
6
+ "path/filepath"
5
7
"testing"
6
8
"time"
7
9
@@ -28,6 +30,14 @@ func init() {
28
30
func TestE2E (t * testing.T ) {
29
31
gomega .RegisterFailHandler (ginkgo .Fail )
30
32
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
+ ))
32
42
ginkgo .RunSpecsWithDefaultAndCustomReporters (t , "kube-oidc-proxy e2e suite" , []ginkgo.Reporter {junitReporter })
33
43
}
You can’t perform that action at this time.
0 commit comments