2017-04-18 22:22:05 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# MIT Licensed
|
|
|
|
#
|
|
|
|
|
|
|
|
test_description="Cleanup state from tests (kill ipfs daemon)"
|
|
|
|
|
|
|
|
. lib/test-lib.sh
|
|
|
|
|
|
|
|
#test_expect_success "Kill ipfs daemon" '
|
|
|
|
# ps | grep "ipfs daemon" | grep -v "grep" > daemon_ps.txt &&
|
|
|
|
# sed -i '''' ''s/^ *//'' daemon_ps.txt &&
|
|
|
|
# awk ''{print$1}'' daemon_ps.txt > daemon_pid.txt &&
|
|
|
|
# kill -9 $(< daemon_pid.txt)
|
|
|
|
#'
|
|
|
|
|
|
|
|
test_expect_success "Kill cluster-service " '
|
2017-04-20 17:28:09 +00:00
|
|
|
kill -1 $(< ../sPID.txt)
|
2017-04-18 22:22:05 +00:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success "Kill ipfs dameon " '
|
2017-04-20 17:28:09 +00:00
|
|
|
kill -1 $(< ../dPID.txt)
|
2017-04-18 22:22:05 +00:00
|
|
|
'
|
|
|
|
|
2017-04-20 17:28:09 +00:00
|
|
|
test_expect_success "Remove config directories" '
|
|
|
|
rm -rf ../test_ipfs &&
|
|
|
|
rm -rf ../test_config
|
|
|
|
'
|
|
|
|
|
|
|
|
|
2017-04-18 22:22:05 +00:00
|
|
|
test_done
|