Skip to content

Commit 8da7baa

Browse files
committed
BUILD/MINOR: ci: add junit reports for some jobs
1 parent 64dda37 commit 8da7baa

File tree

6 files changed

+38
-12
lines changed

6 files changed

+38
-12
lines changed

.aspell.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@ allowed:
6767
- preload
6868
- hostname
6969
- str
70+
- async
71+
- params
72+
- configmap
73+
- junit

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ variables:
1414
DOCKER_DRIVER: overlay2
1515
GO_VERSION: "1.24"
1616
DOCKER_VERSION: "28.1"
17+
JUNIT_FILE: "junit-report.xml"
18+
GOTESTSUM_JUNITFILE: "junit-report.xml"
1719
include:
1820
- local: .gitlab/bots.yml
1921
- 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
@@ -53,14 +53,29 @@ func (suite *TCPSuite) Test_CRD_TCP_OK() {
5353
return true
5454
}, e2e.WaitDuration, e2e.TickDuration)
5555

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

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

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

0 commit comments

Comments
 (0)