Change paths to match certbot renaming. (#1792)

This commit is contained in:
Jacob Hoffman-Andrews 2016-05-06 15:57:07 -07:00
parent efeb81d4be
commit 7208052ad6
3 changed files with 19 additions and 20 deletions

View File

@ -53,7 +53,6 @@ install:
env:
global:
- PATH=$HOME/bin:$PATH # protoc gets installed here
- LETSENCRYPT_PATH=$HOME/letsencrypt
- GO15VENDOREXPERIMENT=1
matrix:
- RUN="vet fmt migrations integration godep-restore errcheck generate"

22
test.sh
View File

@ -103,11 +103,11 @@ function die() {
exit 1
}
function build_letsencrypt() {
function build_certbot() {
run git clone \
https://www.github.com/letsencrypt/letsencrypt.git \
$LETSENCRYPT_PATH || exit 1
cd $LETSENCRYPT_PATH
https://www.github.com/certbot/certbot.git \
$CERTBOT_PATH || exit 1
cd $CERTBOT_PATH
run ./tools/venv.sh
cd -
}
@ -219,19 +219,19 @@ if [[ "$RUN" =~ "integration" ]] ; then
start_context "integration"
update_status --state pending --description "Integration Tests in progress"
if [ -z "$LETSENCRYPT_PATH" ]; then
export LETSENCRYPT_PATH=$(mktemp -d -t leXXXX)
if [ -z "$CERTBOT_PATH" ]; then
export CERTBOT_PATH=$(mktemp -d -t leXXXX)
echo "------------------------------------------------"
echo "--- Checking out letsencrypt client is slow. ---"
echo "--- Recommend setting \$LETSENCRYPT_PATH to ---"
echo "--- Recommend setting \$CERTBOT_PATH to ---"
echo "--- client repo with initialized virtualenv ---"
echo "------------------------------------------------"
build_letsencrypt
elif [ ! -d "${LETSENCRYPT_PATH}" ]; then
build_letsencrypt
build_certbot
elif [ ! -d "${CERTBOT_PATH}" ]; then
build_certbot
fi
source ${LETSENCRYPT_PATH}/venv/bin/activate
source ${CERTBOT_PATH}/venv/bin/activate
python test/integration-test.py --all
case $? in

View File

@ -234,9 +234,9 @@ def run_custom(cmd, cwd=None):
die(ExitStatus.PythonFailure)
def run_client_tests():
root = os.environ.get("LETSENCRYPT_PATH")
root = os.environ.get("CERTBOT_PATH")
assert root is not None, (
"Please set LETSENCRYPT_PATH env variable to point at "
"Please set CERTBOT_PATH env variable to point at "
"initialized (virtualenv) client repo root")
cmd = os.path.join(root, 'tests', 'boulder-integration.sh')
run_custom(cmd, cwd=root)
@ -258,18 +258,18 @@ def main():
parser = argparse.ArgumentParser(description='Run integration tests')
parser.add_argument('--all', dest="run_all", action="store_true",
help="run all of the clients' integration tests")
parser.add_argument('--letsencrypt', dest='run_letsencrypt', action='store_true',
help="run the letsencrypt's (the python client's) integration tests")
parser.add_argument('--certbot', dest='run_certbot', action='store_true',
help="run the certbot integration tests")
parser.add_argument('--node', dest="run_node", action="store_true",
help="run the node client's integration tests")
# allow any ACME client to run custom command for integration
# testing (without having to implement its own busy-wait loop)
parser.add_argument('--custom', metavar="CMD", help="run custom command")
parser.set_defaults(run_all=False, run_letsencrypt=False, run_node=False)
parser.set_defaults(run_all=False, run_certbot=False, run_node=False)
args = parser.parse_args()
if not (args.run_all or args.run_letsencrypt or args.run_node or args.custom is not None):
print >> sys.stderr, "must run at least one of the letsencrypt or node tests with --all, --letsencrypt, --node, or --custom"
if not (args.run_all or args.run_certbot or args.run_node or args.custom is not None):
print >> sys.stderr, "must run at least one of the letsencrypt or node tests with --all, --certbot, --node, or --custom"
die(ExitStatus.IncorrectCommandLineArgs)
if not startservers.start(race_detection=True):
@ -305,7 +305,7 @@ def main():
# Simulate a disconnection from RabbitMQ to make sure reconnects work.
startservers.bounce_forward()
if args.run_all or args.run_letsencrypt:
if args.run_all or args.run_certbot:
run_client_tests()
if args.custom: