Skip to content

Commit 7e83324

Browse files
committed
Force bazel version in tests
1 parent 38dcca7 commit 7e83324

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ check "validate pylint is working" bash -c "pylint --version"
2929

3030
# Bazel-related tools
3131
check "validate bazelisk is working and has the correct version" bash -c "bazelisk version | grep '${bazelisk_version}'"
32+
33+
## This is the bazel version preinstalled in the devcontainer.
34+
## A solid test would disable the network interface first to prevent a different version from being downloaded,
35+
## but that requires CAP_NET_ADMIN, which is not yet added.
36+
export USE_BAZEL_VERSION=${bazel_version}
3237
check "validate bazel is working and has the correct version" bash -c "bazel version | grep '${bazel_version}'"
38+
unset USE_BAZEL_VERSION
39+
3340
check "validate buildifier is working and has the correct version" bash -c "buildifier --version | grep '${buildifier_version}'"
3441
check "validate starpls is working and has the correct version" bash -c "starpls version | grep '${starpls_version}'"
3542
check "validate bazel-compile-commands is working and has the correct version" bash -c "bazel-compile-commands --version 2>&1 | grep '${bazel_compile_commands_version}'"

0 commit comments

Comments
 (0)