File tree Expand file tree Collapse file tree 6 files changed +38
-12
lines changed
Expand file tree Collapse file tree 6 files changed +38
-12
lines changed Original file line number Diff line number Diff line change @@ -67,3 +67,7 @@ allowed:
6767 - preload
6868 - hostname
6969 - str
70+ - async
71+ - params
72+ - configmap
73+ - junit
Original file line number Diff line number Diff 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"
1719include :
1820 - local : .gitlab/bots.yml
1921 - 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 @@ -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
You can’t perform that action at this time.
0 commit comments