mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Expanding tests for le-auto, adding Debian test suite (#2635)
* Adding Debian 7 (Wheezy) to LE tests * Adding Debian 8 (Jessie) to LE tests * Fixing Debian Wheezy certificate addition error * Adding packages to LEA Debian Jessie test and refining the code commenting * Adding installing OpenSSL to the Debian Wheezy LEA test script * Removing LEA tests for Debian Jessie * Fixing nits
This commit is contained in:
committed by
Brad Warren
parent
469fc3775f
commit
c89bd421da
@@ -66,6 +66,11 @@ matrix:
|
|||||||
services: docker
|
services: docker
|
||||||
before_install:
|
before_install:
|
||||||
addons:
|
addons:
|
||||||
|
- sudo: required
|
||||||
|
env: TOXENV=le_auto_wheezy
|
||||||
|
services: docker
|
||||||
|
before_install:
|
||||||
|
addons:
|
||||||
- python: "2.7"
|
- python: "2.7"
|
||||||
env: TOXENV=apacheconftest
|
env: TOXENV=apacheconftest
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# For running tests, build a docker image with a passwordless sudo and a trust
|
||||||
|
# store we can manipulate.
|
||||||
|
|
||||||
|
FROM debian:wheezy
|
||||||
|
|
||||||
|
# Add an unprivileged user:
|
||||||
|
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups sudo --uid 1000 lea
|
||||||
|
|
||||||
|
# Install pip, sudo, openssl, and nose:
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -q -y install python-pip sudo openssl && \
|
||||||
|
apt-get clean
|
||||||
|
RUN pip install nose
|
||||||
|
|
||||||
|
# Let that user sudo:
|
||||||
|
RUN sed -i.bkp -e \
|
||||||
|
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
|
||||||
|
/etc/sudoers
|
||||||
|
|
||||||
|
RUN mkdir -p /home/lea/certbot
|
||||||
|
|
||||||
|
# Install fake testing CA:
|
||||||
|
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
|
||||||
|
|
||||||
|
# Copy code:
|
||||||
|
COPY . /home/lea/certbot/letsencrypt-auto-source
|
||||||
|
|
||||||
|
USER lea
|
||||||
|
WORKDIR /home/lea
|
||||||
|
|
||||||
|
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||||
@@ -137,3 +137,13 @@ commands =
|
|||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
docker
|
docker
|
||||||
passenv = DOCKER_*
|
passenv = DOCKER_*
|
||||||
|
|
||||||
|
[testenv:le_auto_wheezy]
|
||||||
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
||||||
|
# readily available on the Wheezy Docker image.
|
||||||
|
commands =
|
||||||
|
docker build -f letsencrypt-auto-source/Dockerfile.wheezy -t lea letsencrypt-auto-source
|
||||||
|
docker run --rm -t -i lea
|
||||||
|
whitelist_externals =
|
||||||
|
docker
|
||||||
|
passenv = DOCKER_*
|
||||||
|
|||||||
Reference in New Issue
Block a user