From 6c6b1063b0773aade82d10f6203a3bf384302166 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Wed, 5 Aug 2020 06:37:35 -0400 Subject: [PATCH] test: remove temp/indra folder on clean:indra (#1745) 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. --- package.json | 1 + test/simulation/docker-run.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d3c33593e..68f24c351 100644 --- a/package.json +++ b/package.json @@ -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)", diff --git a/test/simulation/docker-run.sh b/test/simulation/docker-run.sh index de01a13fe..764acf85c 100755 --- a/test/simulation/docker-run.sh +++ b/test/simulation/docker-run.sh @@ -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