mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 20:09: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=$!
|
SERVER_PID=$!
|
||||||
trap 'kill -9 "$SERVER_PID" && wait "$SERVER_PID" 2> /dev/null' RETURN
|
trap 'kill -9 "$SERVER_PID" && wait "$SERVER_PID" 2> /dev/null' RETURN
|
||||||
sleep 1
|
sleep 1
|
||||||
( set -e; setup )
|
( set -e;
|
||||||
( set -e; run_test )
|
setup
|
||||||
|
run_test
|
||||||
|
teardown
|
||||||
|
)
|
||||||
result=$?
|
result=$?
|
||||||
( set -e; teardown )
|
|
||||||
return "$result"
|
return "$result"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue