Skip to content

Commit

Permalink
Merge pull request #8871 from gyuho/test-script-on-functional-tests
Browse files Browse the repository at this point in the history
test: Clean agent directories on disk before functional test runs, no…
  • Loading branch information
gyuho committed Nov 14, 2017
2 parents 6f077bd + 1bca2e9 commit ec25a5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/agent-*
/coverage
/covdir
/gopath
Expand Down
4 changes: 3 additions & 1 deletion test
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ function integration_extra {
}

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 @@ -138,7 +141,6 @@ function functional_pass {
agent_pids=($agent_pids)
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}
Expand Down

0 comments on commit ec25a5c

Please sign in to comment.