mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-18 07:13:48 +01:00
9
test.sh
9
test.sh
@@ -114,7 +114,7 @@ _CHECK_ERRORLOG
|
||||
_TEST "First run in cron mode, checking if private key is generated and registered"
|
||||
./letsencrypt.sh --cron > tmplog 2> errorlog || _FAIL "Script execution failed"
|
||||
_CHECK_LOG "Registering account key"
|
||||
_CHECK_FILE "private_key.pem"
|
||||
_CHECK_FILE accounts/*/account_key.pem
|
||||
_CHECK_ERRORLOG
|
||||
|
||||
# Temporarily move config out of the way and try signing certificate by using temporary config location
|
||||
@@ -131,10 +131,6 @@ _CHECK_LOG "Done!"
|
||||
_CHECK_ERRORLOG
|
||||
mv tmp_config config
|
||||
|
||||
# Move private key and add new location to config
|
||||
mv private_key.pem account_key.pem
|
||||
echo 'PRIVATE_KEY="./account_key.pem"' >> config
|
||||
|
||||
# Add third domain to command-lime, should force renewal.
|
||||
_TEST "Run in cron mode again, this time adding third domain, should force renewal."
|
||||
./letsencrypt.sh --cron --domain "${TMP_URL}" --domain "${TMP2_URL}" --domain "${TMP3_URL}" > tmplog 2> errorlog || _FAIL "Script execution failed"
|
||||
@@ -184,9 +180,6 @@ _CHECK_LOG "BEGIN CERTIFICATE"
|
||||
_CHECK_LOG "END CERTIFICATE"
|
||||
_CHECK_NOT_LOG "ERROR"
|
||||
|
||||
# Delete account key (not needed anymore)
|
||||
rm account_key.pem
|
||||
|
||||
# Check if renewal works
|
||||
_TEST "Run in cron mode again, to check if renewal works"
|
||||
echo 'RENEW_DAYS="300"' >> config
|
||||
|
||||
Reference in New Issue
Block a user