Skip to content

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

@mpolitzer

Description

@mpolitzer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRestructuring code, while not changing its original functionality

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions