]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
added test for cleanup command
authorLukas Schauer <lukas@schauer.so>
Mon, 15 Feb 2016 19:41:28 +0000 (20:41 +0100)
committerLukas Schauer <lukas@schauer.so>
Mon, 15 Feb 2016 19:41:28 +0000 (20:41 +0100)
test.sh

diff --git a/test.sh b/test.sh
index 0893bed4f8fc10d0188f32e51b60d952c611edc2..3e23f065eac80df9240fc7002c07a8d23a299ab7 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -209,5 +209,13 @@ _CHECK_LOG "Done."
 _CHECK_FILE "certs/${TMP_URL}/${REAL_CERT}-revoked"
 _CHECK_ERRORLOG
 
+# Test cleanup command
+_TEST "Cleaning up certificates"
+./letsencrypt.sh --cleanup > tmplog 2> errorlog || _FAIL "Script execution failed"
+_CHECK_LOG "Moving unused file to archive directory: ${TMP_URL}/cert-"
+_CHECK_LOG "Moving unused file to archive directory: ${TMP_URL}/chain-"
+_CHECK_LOG "Moving unused file to archive directory: ${TMP_URL}/fullchain-"
+_CHECK_ERRORLOG
+
 # All done
 exit 0