-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(pd): add integration test for grpc reflection #4426
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cratelyn N.B. I'd much rather use something like nix flakes or devbox to manage these dependencies. Not going down that rabbit hole now, but flagging that it'd be less work overall to track tooling deps in a holistic way, cf. #4264.