Skip to content

Commit 7a890ae

Browse files
committed
BUILD/MINOR: ci: add junit reports for some jobs
1 parent 0be09d5 commit 7a890ae

File tree

6 files changed

+35
-12
lines changed

6 files changed

+35
-12
lines changed

.aspell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ allowed:
6262
- async
6363
- params
6464
- configmap
65+
- junit

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ variables:
1515
DOCKER_DRIVER: overlay2
1616
GO_VERSION: "1.24"
1717
DOCKER_VERSION: "28.1"
18+
JUNIT_FILE: "junit-report.xml"
19+
GOTESTSUM_JUNITFILE: "junit-report.xml"
1820
include:
1921
- local: .gitlab/bots.yml
2022
- local: .gitlab/diff.yml

.gitlab/lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,15 @@ commit-policy:
4646
rules:
4747
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
4848
image:
49-
name: $CI_REGISTRY_GO/commit-check:5.2.0
49+
name: $CI_REGISTRY_GO/commit-check:5.4.0
5050
entrypoint: [""]
5151
tags:
5252
- go
5353
script:
5454
- /check
55+
artifacts:
56+
when: on_failure
57+
paths:
58+
- junit-report.xml
59+
reports:
60+
junit: junit-report.xml

.gitlab/unit-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ unit-tests:
1010
tags:
1111
- go
1212
script:
13-
- go build -v .
14-
- go test -v ./...
13+
- make test

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ TARGETPLATFORM?=linux/amd64
33
GOOS?=linux
44
GOARCH?=amd64
55
GOLANGCI_LINT_VERSION=1.64.5
6-
CHECK_COMMIT=5.2.0
6+
CHECK_COMMIT=5.4.0
77

88
.PHONY: test
99
test:
10-
go test ./...
10+
gotestsum --format-icons=hivis --format=testdox --format-hide-empty-pkg -- $(go list ./... | grep -v /deploy)
1111

1212
.PHONY: e2e
1313
e2e:

deploy/tests/e2e/crd-tcp/cr_tcp_test.go

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,29 @@ func (suite *TCPSuite) Test_CRD_TCP_OK() {
5454
return true
5555
}, e2e.WaitDuration, e2e.TickDuration)
5656

57-
// Get updated config and check it
58-
cfg, err := suite.test.GetIngressControllerFile("/etc/haproxy/haproxy.cfg")
59-
suite.Require().NoError(err, "Could not get Haproxy config")
60-
reader := strings.NewReader(cfg)
61-
p, err := parser.New(options.Reader(reader))
62-
suite.Require().NoError(err, "Could not get Haproxy config parser")
57+
var p parser.Parser
58+
suite.Eventually(func() bool {
59+
// Get updated config and check it
60+
cfg, err := suite.test.GetIngressControllerFile("/etc/haproxy/haproxy.cfg")
61+
if err != nil {
62+
suite.T().Log(err)
63+
return false
64+
}
65+
reader := strings.NewReader(cfg)
66+
p, err = parser.New(options.Reader(reader))
67+
if err != nil {
68+
suite.T().Log(err)
69+
return false
70+
}
6371

64-
suite.checkFrontends(p)
72+
err = suite.checkFrontends(p)
73+
if err != nil {
74+
suite.T().Log(err)
75+
return false
76+
}
77+
78+
return true
79+
}, e2e.WaitDuration, e2e.TickDuration)
6580

6681
// Checks for backend
6782
// Checks that we have correctly applied the backend CR

0 commit comments

Comments
 (0)