mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:22:16 +02:00
cleanup test scripts
This commit is contained in:
@@ -23,16 +23,16 @@ cd tests/letstest/testdata/
|
|||||||
|
|
||||||
# 2. refer to the config with the same level of relativitity that it itself
|
# 2. refer to the config with the same level of relativitity that it itself
|
||||||
# contains :/
|
# contains :/
|
||||||
letsencrypt-auto certificates --config-dir sample-config
|
OUT=`letsencrypt-auto certificates --config-dir sample-config -v`
|
||||||
TEST_CERTS=`letsencrypt-auto certificates --config-dir sample-config | grep TEST_CERT | wc -l`
|
TEST_CERTS=`echo "$OUT" | grep TEST_CERT | wc -l`
|
||||||
REVOKED=`letsencrypt-auto certificates --config-dir sample-config | grep REVOKED | wc -l`
|
REVOKED=`echo "$OUT" | grep REVOKED | wc -l`
|
||||||
|
|
||||||
if [ "$TEST_CERTS" != 2 ] ; then
|
if [ "$TEST_CERTS" != 2 ] ; then
|
||||||
echo Did not find two test certs as expected ("$TEST_CERTS")
|
echo "Did not find two test certs as expected ($TEST_CERTS)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$REVOKED" != 1 ] ; then
|
if [ "$REVOKED" != 1 ] ; then
|
||||||
echo Did not find one revoked cert as expected ("$REVOKED")
|
echo "Did not find one revoked cert as expected ($REVOKED)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ cd tests/letstest/testdata/
|
|||||||
|
|
||||||
# 2. refer to the config with the same level of relativitity that it itself
|
# 2. refer to the config with the same level of relativitity that it itself
|
||||||
# contains :/
|
# contains :/
|
||||||
sudo ../../../venv/bin/certbot certificates -v --config-dir sample-config
|
OUT=`../../../venv/bin/certbot certificates -v --config-dir sample-config`
|
||||||
TEST_CERTS=`sudo ../../../venv/bin/certbot certificates --config-dir sample-config | grep TEST_CERT | wc -l`
|
TEST_CERTS=`echo "$OUT" | grep TEST_CERT | wc -l`
|
||||||
REVOKED=`sudo ../../../venv/bin/certbot certificates --config-dir sample-config | grep REVOKED | wc -l`
|
REVOKED=`echo "$OUT" | grep REVOKED | wc -l`
|
||||||
|
|
||||||
if [ "$TEST_CERTS" -ne 2 ] ; then
|
if [ "$TEST_CERTS" != 2 ] ; then
|
||||||
echo Did not find two test certs as expected ("$TEST_CERTS")
|
echo "Did not find two test certs as expected ($TEST_CERTS)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$REVOKED" -ne 1 ] ; then
|
if [ "$REVOKED" != 1 ] ; then
|
||||||
echo Did not find one revoked cert as expected ("$REVOKED")
|
echo "Did not find one revoked cert as expected ($REVOKED)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user