sourcegraph/testing
Noah S-C 06262e0936
bazel: patches to allow use_default_shell_env for e2e testing (#59675)
Another step towards https://github.com/sourcegraph/sourcegraph/issues/59155, previously `bazel test //...` would error at analysis time on `//client/web/src/end-to-end:e2e` due to it attempting to perform variable substitution for env vars e.g. `"HEADLESS": "$(E2E_HEADLESS)"`, for values not defined via `--define` (we only set these explicitly in .aspect/bazelrc/ci.sourcegraph.bazelrc and some `sg` targets).

By leveraging https://bazel.build/rules/lib/builtins/actions#run.use_default_shell_env, we can allow the test to read values from `--action_env` while _also_ having explicit values set via `env` macro parameter. Previously, setting `env` macro parameter would completely shadow any `--action_env` values. 
Unfortunately, we cant use `--test_env` for this, as `js_run_binary` is an action not a test (or something like that?).

We also cant do env renaming anymore, meaning we have to drop the `E2E_` prefix for some env vars. At least one script needed some reworking to accommodate that `e2e_test.sh` 

![image](https://github.com/sourcegraph/sourcegraph/assets/18282288/133a98c6-411d-4a10-95fd-4abd42cedb24)


## Test plan

👁️ CI once again 👁️
2024-01-24 18:50:19 -08:00
..
code-intel ci: remove outdated scripts (#59666) 2024-01-17 11:39:33 +00:00
tools Remove HTTP for inter-service RPC (#59093) 2024-01-11 19:46:32 +01:00
backend_integration_test_p4.sh ci: isolate P4 SubRepo perms into a different target that gets run concurrently (#59670) 2024-01-17 15:45:31 +01:00
backend_integration_test.sh ci: isolate P4 SubRepo perms into a different target that gets run concurrently (#59670) 2024-01-17 15:45:31 +01:00
BUILD.bazel bazel: patches to allow use_default_shell_env for e2e testing (#59675) 2024-01-24 18:50:19 -08:00
codeintel_integration_test.sh Allow to run e2e tests locally (#55998) 2023-08-29 11:08:47 -05:00
defs.bzl Merge enterprise and non-enterprise server images (#56446) 2023-09-11 14:39:27 +02:00
e2e_test.sh bazel: patches to allow use_default_shell_env for e2e testing (#59675) 2024-01-24 18:50:19 -08:00