mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:32:13 +02:00
Expanding tests for le-auto, adding Ubuntu test suite (#2548)
* Adding Ubuntu Wily to LEA testing * Setting up certs correctly for Ubuntu 15.10 * Adding 12.04 * Removing redundant update-ca-certificates from 12.04 le-auto testing script * Fixing OpenSSL on Precise * Adding Vivid to le_auto tests * Cleaning up LEA tests configuration for Trusty * Ordering LEA test entries in .travis.yml and renaming them correctly * Removing Ubuntu Vivid * Refining comments * Removing Ubuntu Wily since it reached EOL * Removing .travis.yml duplicates * Fixing nits
This commit is contained in:
committed by
Brad Warren
parent
6eb3ce2f7a
commit
469fc3775f
+7
-2
@@ -46,18 +46,23 @@ matrix:
|
|||||||
- sudo cat /var/log/mysql/error.log
|
- sudo cat /var/log/mysql/error.log
|
||||||
- ps aux | grep mysql
|
- ps aux | grep mysql
|
||||||
services: docker
|
services: docker
|
||||||
|
- sudo: required
|
||||||
|
env: TOXENV=apache_compat
|
||||||
|
services: docker
|
||||||
|
before_install:
|
||||||
|
addons:
|
||||||
- sudo: required
|
- sudo: required
|
||||||
env: TOXENV=nginx_compat
|
env: TOXENV=nginx_compat
|
||||||
services: docker
|
services: docker
|
||||||
before_install:
|
before_install:
|
||||||
addons:
|
addons:
|
||||||
- sudo: required
|
- sudo: required
|
||||||
env: TOXENV=le_auto
|
env: TOXENV=le_auto_precise
|
||||||
services: docker
|
services: docker
|
||||||
before_install:
|
before_install:
|
||||||
addons:
|
addons:
|
||||||
- sudo: required
|
- sudo: required
|
||||||
env: TOXENV=apache_compat
|
env: TOXENV=le_auto_trusty
|
||||||
services: docker
|
services: docker
|
||||||
before_install:
|
before_install:
|
||||||
addons:
|
addons:
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# For running tests, build a docker image with a passwordless sudo and a trust
|
||||||
|
# store we can manipulate.
|
||||||
|
|
||||||
|
FROM ubuntu:precise
|
||||||
|
|
||||||
|
# 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"]
|
||||||
@@ -99,17 +99,6 @@ commands =
|
|||||||
commands =
|
commands =
|
||||||
{toxinidir}/tests/modification-check.sh
|
{toxinidir}/tests/modification-check.sh
|
||||||
|
|
||||||
[testenv:le_auto]
|
|
||||||
# At the moment, this tests under Python 2.7 only, as only that version is
|
|
||||||
# readily available on the Trusty Docker image.
|
|
||||||
commands =
|
|
||||||
{toxinidir}/tests/modification-check.sh
|
|
||||||
docker build -t lea letsencrypt-auto-source
|
|
||||||
docker run --rm -t -i lea
|
|
||||||
whitelist_externals =
|
|
||||||
docker
|
|
||||||
passenv = DOCKER_*
|
|
||||||
|
|
||||||
[testenv:apache_compat]
|
[testenv:apache_compat]
|
||||||
commands =
|
commands =
|
||||||
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
||||||
@@ -127,3 +116,24 @@ commands =
|
|||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
docker
|
docker
|
||||||
passenv = DOCKER_*
|
passenv = DOCKER_*
|
||||||
|
|
||||||
|
[testenv:le_auto_precise]
|
||||||
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
||||||
|
# readily available on the Precise Docker image.
|
||||||
|
commands =
|
||||||
|
docker build -f letsencrypt-auto-source/Dockerfile.precise -t lea letsencrypt-auto-source
|
||||||
|
docker run --rm -t -i lea
|
||||||
|
whitelist_externals =
|
||||||
|
docker
|
||||||
|
passenv = DOCKER_*
|
||||||
|
|
||||||
|
[testenv:le_auto_trusty]
|
||||||
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
||||||
|
# readily available on the Trusty Docker image.
|
||||||
|
commands =
|
||||||
|
{toxinidir}/tests/modification-check.sh
|
||||||
|
docker build -f letsencrypt-auto-source/Dockerfile.trusty -t lea letsencrypt-auto-source
|
||||||
|
docker run --rm -t -i lea
|
||||||
|
whitelist_externals =
|
||||||
|
docker
|
||||||
|
passenv = DOCKER_*
|
||||||
|
|||||||
Reference in New Issue
Block a user