File tree Expand file tree Collapse file tree 6 files changed +35
-12
lines changed
Expand file tree Collapse file tree 6 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -62,3 +62,4 @@ allowed:
6262 - async
6363 - params
6464 - configmap
65+ - junit
Original file line number Diff line number Diff 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"
1820include :
1921 - local : .gitlab/bots.yml
2022 - local : .gitlab/diff.yml
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ TARGETPLATFORM?=linux/amd64
33GOOS? =linux
44GOARCH? =amd64
55GOLANGCI_LINT_VERSION =1.64.5
6- CHECK_COMMIT =5.2 .0
6+ CHECK_COMMIT =5.4 .0
77
88.PHONY : test
99test :
10- go test ./...
10+ gotestsum --format-icons=hivis --format=testdox --format-hide-empty-pkg -- $( go list ./... | grep -v /deploy )
1111
1212.PHONY : e2e
1313e2e :
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments