Skip to content

Commit

Permalink
test: remove temp/indra folder on clean:indra (#1745)
Browse files Browse the repository at this point in the history
The `temp/indra` folder for simulation tests was not being removed when
running `npm run:sim:clean`. A stale indra folder could cause tests to
fail and would need to be manually deleted. This PR introduces a new
npm script `npm run test:sim:clean:indra` that will remove the indra
folder and will result in a totally clean environment if run after
the normal `npm run:sim:clean` call.
  • Loading branch information
sangaman authored Aug 5, 2020
1 parent ad3dcdb commit 6c6b106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"test:sim:custom-xud:apply": "git apply --reject test/simulation/custom-xud.patch",
"test:sim:custom-xud:reverse": "git apply -R test/simulation/custom-xud.patch",
"test:sim:clean": "(cd test/simulation && ./docker-clean.sh)",
"test:sim:clean:indra": "rm -rf test/simulation/temp/indra",
"test:sim:clean:xud": "(cd test/simulation && ./docker-clean.sh xud)",
"test:sim:clean:lnd": "(cd test/simulation && ./docker-clean.sh lnd)",
"test:sim:clean:connext": "(cd test/simulation && ./docker-clean.sh connext)",
Expand Down
3 changes: 2 additions & 1 deletion test/simulation/docker-run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash

# create the temp directory with the current user so it is the owner for permissions
# create the temp directories with the current user so it is the owner for permissions
mkdir -p $PWD/temp/logs
mkdir -p $PWD/temp/indra

pushd temp/indra
make start
Expand Down

0 comments on commit 6c6b106

Please sign in to comment.