Skip to content

Commit 48058dc

Browse files
IvanHunterslexfrei
authored andcommitted
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 1a2c876 commit 48058dc

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
@@ -84,7 +84,10 @@ WORKDIR /workspace/opensearch-operator
8484
# them: the build below compiles main.go, so a test file that had stopped
8585
# compiling, or stopped asserting, would still produce an image. These two
8686
# package trees are the ones the patches touch, and both run without a cluster.
87-
RUN go test ./opensearch-gateway/... ./pkg/reconcilers/...
87+
# -race is on because the timeout tests run a listener in one goroutine and
88+
# inspect what it accepted from another: an unsynchronised access there passes
89+
# the plain run, so nothing else would catch it. The builder has cgo and gcc.
90+
RUN go test -race ./opensearch-gateway/... ./pkg/reconcilers/...
8891

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

0 commit comments

Comments
 (0)