git » chasquid » commit 94c4492

test/t-01-simple_local: Don't fail if test certificates are missing

author Alberto Bertogli
2017-12-08 13:56:04 UTC
committer Alberto Bertogli
2017-12-08 13:56:04 UTC
parent b3592b7bf9beb176b0058b17baa597b233354eef

test/t-01-simple_local: Don't fail if test certificates are missing

The test starts by removing the previous test certificates, which may
or may not exist.

If they don't, currently "rm" fails, causing the whole test to fail.
I am surprised I did not notice this before :(

This patch fixes the bug by using "rm -f" to remove the test certs.

test/t-01-simple_local/run.sh +1 -1

diff --git a/test/t-01-simple_local/run.sh b/test/t-01-simple_local/run.sh
index a4e30f0..16f3251 100755
--- a/test/t-01-simple_local/run.sh
+++ b/test/t-01-simple_local/run.sh
@@ -6,7 +6,7 @@ set -e
 init
 
 # This should fail, as it has no certificates.
-rm config/certs/testserver/*.pem
+rm -f config/certs/testserver/*.pem
 if chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config; then
 	fail "chasquid should not start without certificates"
 fi