-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(pd): add integration test for grpc reflection
Refs #4392. We want to ensure that server reflection remains working, despite changes to the tonic dependencies (#4400) and proto compiling logic #4422. While the most effective test is exercising all these protos regularly, we currently lack solid coverage, so this superficial integration test is a sanity-check to save time versus building locally and inspecting the output manually.
- Loading branch information
Showing
6 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Utility script to download a specific version of grpcurl for use | ||
# in testing Penumbra, specifically in validating the gRPC reflection | ||
# APIs via integration tests. | ||
# Designed to be used in CI contexts, to bootstrap a testing setup quickly. | ||
set -euo pipefail | ||
|
||
|
||
# Sane defaults | ||
GRPCURL_VERSION="${GRPCURL_VERSION:-1.9.1}" | ||
|
||
# Download and extract | ||
grpcurl_download_url="https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz" | ||
grpcurl_temp_dir="$(mktemp -d)" | ||
pushd "$grpcurl_temp_dir" > /dev/null | ||
curl -sSfL -O "$grpcurl_download_url" | ||
tar -xzf "grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz" grpcurl | ||
trap 'rm -r "$grpcurl_temp_dir"' EXIT | ||
|
||
# Try to write to system-wide location. | ||
if [[ -w /usr/local/bin/ ]] ; then | ||
mv -v grpcurl /usr/local/bin/ | ||
else | ||
grpcurl_install_dir="${HOME:?}/bin" | ||
>&2 echo "WARNING: /usr/local/bin/ not writable, installing grpcurl to $grpcurl_install_dir" | ||
mkdir -p "$grpcurl_install_dir" | ||
mv -v grpcurl "${grpcurl_install_dir}/" | ||
export PATH="$PATH:$grpcurl_install_dir" | ||
fi | ||
|
||
# Sanity checks | ||
echo "Checking that grpcurl is installed:" | ||
which grpcurl | ||
grpcurl --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters