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 16, 2017
1 parent 731e7aa commit 15fdc29
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 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
9 changes: 6 additions & 3 deletions cmd/vendor/github.com/coreos/bbolt/freelist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import:
- package: github.com/bgentry/speakeasy
version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd
- package: github.com/coreos/bbolt
version: v1.3.1-coreos.3
version: v1.3.1-coreos.5
- package: github.com/cockroachdb/cmux
version: 112f0506e7743d64a6eb8fedbcff13d9979bbf92
- package: github.com/coreos/go-semver
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 15fdc29

Please sign in to comment.