Skip to content

Commit

Permalink
test: Clean agent directories on disk before functional test runs, no…
Browse files Browse the repository at this point in the history
…t after

This is primarily so CI tooling can capture the agent logs after the functional tester runs.
  • Loading branch information
jpbetz committed Nov 14, 2017
1 parent 731e7aa commit cb8598f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/agent-*
/coverage
/gopath
/gopath.proto
Expand Down
4 changes: 2 additions & 2 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ 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 &
Expand Down Expand Up @@ -121,8 +123,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 with exit code" ${ETCD_TESTER_EXIT_CODE}
exit ${ETCD_TESTER_EXIT_CODE}
Expand Down

0 comments on commit cb8598f

Please sign in to comment.