Skip to content

Commit

Permalink
Use letsencrypt directly
Browse files Browse the repository at this point in the history
  • Loading branch information
adferrand committed May 7, 2019
1 parent 8e34330 commit fdbdc43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
set -xe

cd letsencrypt
./certbot-auto -v -n --debug --version
./letsencrypt-auto -v -n --debug --version
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ set -xe

env

cd letsencrypt
./certbot-auto -n \
./letsencrypt-auto -n \
--server ${DIRECTORY_URL} \
--no-verify-ssl \
--http-01-port ${HTTP_01_PORT} \
Expand Down
26 changes: 12 additions & 14 deletions certbot-ci/certbot_integration_tests/farm_tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

class IntegrationTestsContext(object):

def __init__(self, request, letsencrypt_sources, docker_envs):
def __init__(self, request, letsencrypt_auto, docker_envs):
self.workspace = tempfile.mkdtemp()
self.os_dist = request.param

shutil.copytree(letsencrypt_sources, os.path.join(self.workspace, 'letsencrypt'))
shutil.copytree(letsencrypt_auto, os.path.join(self.workspace, 'letsencrypt-auto'))
for one_script in SCRIPTS:
shutil.copy(os.path.join(BASE_SCRIPTS_PATH, one_script),
os.path.join(self.workspace, os.path.basename(one_script)))
Expand Down Expand Up @@ -66,16 +66,14 @@ def __repr__(self):


@pytest.fixture(scope='module')
def letsencrypt_sources():
workspace = tempfile.mkdtemp()
repo_path = os.path.join(workspace, 'letsencrypt')
command = ['git', 'clone', 'https://github.com/certbot/certbot.git', repo_path,
'--single-branch', '--depth=1']
subprocess.check_call(command, stdout=sys.stderr, stderr=subprocess.STDOUT)
try:
yield repo_path
finally:
shutil.rmtree(workspace)
def letsencrypt_auto(request):
current_path = request.config.rootdir
while '.git' not in os.listdir(current_path):
parent = os.path.dirname(current_path)
if parent == current_path:
raise ValueError('Could not find git root path')
current_path = parent
yield os.path.join(current_path, 'letsencrypt-auto-source', 'letsencrypt-auto')


@pytest.fixture(scope='module')
Expand All @@ -90,8 +88,8 @@ def docker_envs():


@pytest.fixture()
def docker_dist(request, letsencrypt_sources, docker_envs):
context = IntegrationTestsContext(request, letsencrypt_sources, docker_envs)
def docker_dist(request, letsencrypt_auto, docker_envs):
context = IntegrationTestsContext(request, letsencrypt_auto, docker_envs)
try:
yield context
finally:
Expand Down

0 comments on commit fdbdc43

Please sign in to comment.