mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: Clean agent directories on disk before functional test runs, not after
This is primarily so CI tooling can capture the agent logs after the functional tester runs. Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
f9eb75044a
commit
c28c14a5f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/agent-*
|
||||
/coverage
|
||||
/gopath
|
||||
/gopath.proto
|
||||
|
4
test
4
test
@ -93,6 +93,9 @@ function integration_pass {
|
||||
}
|
||||
|
||||
function functional_pass {
|
||||
# Clean up any data and logs from previous runs
|
||||
rm -rf ./agent-*
|
||||
|
||||
for a in 1 2 3; do
|
||||
mkdir -p ./agent-$a
|
||||
./bin/etcd-agent -etcd-path ./bin/etcd -etcd-log-dir "./agent-$a" -port ":${a}9027" -use-root=false &
|
||||
@ -121,7 +124,6 @@ function functional_pass {
|
||||
echo "Waiting for processes to exit"
|
||||
kill -s TERM ${agent_pids}
|
||||
for a in ${agent_pids}; do wait $a || true; done
|
||||
rm -rf ./agent-*
|
||||
|
||||
if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then
|
||||
echo "--- FAIL: exit code" ${ETCD_TESTER_EXIT_CODE}
|
||||
|
Loading…
x
Reference in New Issue
Block a user