Skip to content
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

Use set -e and trap to improve test shell-script #182

Open
mpolitzer opened this issue Feb 6, 2024 · 0 comments
Open

Use set -e and trap to improve test shell-script #182

mpolitzer opened this issue Feb 6, 2024 · 0 comments
Assignees
Labels
refactor Restructuring code, while not changing its original functionality

Comments

@mpolitzer
Copy link
Contributor

mpolitzer commented Feb 6, 2024

Context

What problem are you trying to solve?

Code improvement

As per: #171 (review)

We could automate cleanup and exit on any error for scripts: tests/scripts/test-jsonrpc-server.sh and tests/scripts/test-grpc-server.sh.

with:

set -e
trap wait_for_shutdown EXIT

note: here docs return false for whatever reason, use this trick to make them work.

cat << EOF | true
EOF
@mpolitzer mpolitzer added the refactor Restructuring code, while not changing its original functionality label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Restructuring code, while not changing its original functionality
Projects
Status: Todo
Development

No branches or pull requests

1 participant