mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 11:59:48 -05:00
refactor(fixtures): merge test steps in a single subshell
This commit is contained in:
parent
00167db3d6
commit
a6a8261a73
1 changed files with 5 additions and 3 deletions
|
@ -13,10 +13,12 @@ run_fixture() {
|
|||
SERVER_PID=$!
|
||||
trap 'kill -9 "$SERVER_PID" && wait "$SERVER_PID" 2> /dev/null' RETURN
|
||||
sleep 1
|
||||
( set -e; setup )
|
||||
( set -e; run_test )
|
||||
( set -e;
|
||||
setup
|
||||
run_test
|
||||
teardown
|
||||
)
|
||||
result=$?
|
||||
( set -e; teardown )
|
||||
return "$result"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue