mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
Use pytest in cb-auto tests
This commit is contained in:
parent
b020f94a01
commit
08479b2300
4 changed files with 16 additions and 12 deletions
|
|
@ -5,12 +5,13 @@ FROM centos:6
|
|||
|
||||
RUN yum install -y epel-release
|
||||
|
||||
# Install pip, sudo and nose:
|
||||
# Install pip, sudo and pytest:
|
||||
RUN yum install -y python-pip sudo
|
||||
# Use pipstrap to install a stable and tested version of pip
|
||||
COPY ./pieces/pipstrap.py /opt
|
||||
RUN /opt/pipstrap.py
|
||||
RUN pip install nose
|
||||
# Pin pytest version for increased stability
|
||||
RUN pip install pytest==3.2.5
|
||||
|
||||
# Add an unprivileged user:
|
||||
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups wheel --uid 1000 lea
|
||||
|
|
@ -32,4 +33,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source
|
|||
USER lea
|
||||
WORKDIR /home/lea
|
||||
|
||||
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ 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:
|
||||
# Install pip, sudo, openssl, and pytest:
|
||||
RUN apt-get update && \
|
||||
apt-get -q -y install python-pip sudo openssl && \
|
||||
apt-get clean
|
||||
|
|
@ -14,7 +14,8 @@ RUN apt-get update && \
|
|||
# Use pipstrap to install a stable and tested version of pip
|
||||
COPY ./pieces/pipstrap.py /opt
|
||||
RUN /opt/pipstrap.py
|
||||
RUN pip install nose
|
||||
# Pin pytest version for increased stability
|
||||
RUN pip install pytest==3.2.5
|
||||
|
||||
# Let that user sudo:
|
||||
RUN sed -i.bkp -e \
|
||||
|
|
@ -32,4 +33,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source
|
|||
USER lea
|
||||
WORKDIR /home/lea
|
||||
|
||||
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
|
|
|
|||
|
|
@ -11,14 +11,15 @@ RUN sed -i.bkp -e \
|
|||
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
|
||||
/etc/sudoers
|
||||
|
||||
# Install pip and nose:
|
||||
# Install pip and pytest:
|
||||
RUN apt-get update && \
|
||||
apt-get -q -y install python-pip && \
|
||||
apt-get clean
|
||||
# Use pipstrap to install a stable and tested version of pip
|
||||
COPY ./pieces/pipstrap.py /opt
|
||||
RUN /opt/pipstrap.py
|
||||
RUN pip install nose
|
||||
# Pin pytest version for increased stability
|
||||
RUN pip install pytest==3.2.5
|
||||
|
||||
RUN mkdir -p /home/lea/certbot
|
||||
|
||||
|
|
@ -32,4 +33,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source
|
|||
USER lea
|
||||
WORKDIR /home/lea
|
||||
|
||||
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@ 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:
|
||||
# Install pip, sudo, openssl, and pytest:
|
||||
RUN apt-get update && \
|
||||
apt-get -q -y install python-pip sudo openssl && \
|
||||
apt-get clean
|
||||
# Use pipstrap to install a stable and tested version of pip
|
||||
COPY ./pieces/pipstrap.py /opt
|
||||
RUN /opt/pipstrap.py
|
||||
RUN pip install nose
|
||||
# Pin pytest version for increased stability
|
||||
RUN pip install pytest==3.2.5
|
||||
|
||||
# Let that user sudo:
|
||||
RUN sed -i.bkp -e \
|
||||
|
|
@ -31,4 +32,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source
|
|||
USER lea
|
||||
WORKDIR /home/lea
|
||||
|
||||
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue