bazel: fix sg starts tests in //dev/sg (#47694)

Fixes `bazel test //dev/sg:sg_test` by exporting go.mod for `sg_test`

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
This commit is contained in:
Dave Try 2023-02-16 07:28:28 -05:00 committed by GitHub
parent 2e60c065ed
commit 78c5353b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -108,3 +108,5 @@ js_library(
"//:node_modules/postcss-inset",
],
)
exports_files(["go.mod"])

View File

@ -137,7 +137,11 @@ go_test(
"sg_start_test.go",
"suggest_test.go",
],
# Required by func findRoot() to check if sg is running in sourcegraph/sourcegraph
data = ["//:go.mod"],
embed = [":sg_lib"],
# HOME is required to be set to start sg
env = {"HOME": "/tmp"},
deps = [
"//dev/sg/internal/run",
"//dev/sg/internal/sgconf",