Skip to content

Commit 4b8085c

Browse files
committed
build(opensearch-operator): run the patched tree's tests under -race
The timeout tests drive a listener from one goroutine and inspect what it accepted from another. The plain run passes an unsynchronised access there, so nothing in this repository would catch one. The builder image carries cgo and gcc, and the package images are built natively on x86-64 runners, so the detector is supported where this runs. Signed-off-by: IvanHunters <[email protected]>
1 parent 73dc5f2 commit 4b8085c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/system/opensearch-operator/images/opensearch-operator

‎packages/system/opensearch-operator/images/opensearch-operator/Dockerfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ WORKDIR /workspace/opensearch-operator
7070
# them: the build below compiles main.go, so a test file that had stopped
7171
# compiling, or stopped asserting, would still produce an image. These two
7272
# package trees are the ones the patches touch, and both run without a cluster.
73-
RUN go test ./opensearch-gateway/... ./pkg/reconcilers/...
73+
# -race is on because the timeout tests run a listener in one goroutine and
74+
# inspect what it accepted from another: an unsynchronised access there passes
75+
# the plain run, so nothing else would catch it. The builder has cgo and gcc.
76+
RUN go test -race ./opensearch-gateway/... ./pkg/reconcilers/...
7477

7578
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -o manager main.go
7679

0 commit comments

Comments
 (0)