Skip to content

Commit 801a209

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 a637c97 commit 801a209

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

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

0 commit comments

Comments
 (0)