Add stacklight tests from stackligth-pytest repo
Change-Id: I2d2ea6201b6495c35bed57d71450b30b0e0ff49f
Relates-Task: #PROD-21318(PROD:21318)
diff --git a/Dockerfile b/Dockerfile
index cd6b073..960ec96 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,6 +10,8 @@
USER root
ARG UBUNTU_MIRROR_URL="http://archive.ubuntu.com/ubuntu"
+ARG SL_TEST_REPO='http://gerrit.mcp.mirantis.com/mcp/stacklight-pytest'
+ARG SL_TEST_BRANCH='master'
WORKDIR /var/lib/
COPY bin/ /usr/local/bin/
@@ -23,26 +25,37 @@
echo "deb [arch=amd64] $UBUNTU_MIRROR_URL xenial-updates main restricted universe multiverse" >> sources.list && \
echo "deb [arch=amd64] $UBUNTU_MIRROR_URL xenial-backports main restricted universe multiverse" >> sources.list && \
popd ; apt-get update && apt-get upgrade -y && \
- apt-get install -y build-essential curl git-core iputils-ping libffi-dev libldap2-dev libsasl2-dev libssl-dev patch python-dev python-pip python3-dev vim-tiny wget \
- python-virtualenv python3-virtualenv && \
+ apt-get install -y build-essential curl git-core iputils-ping libffi-dev libldap2-dev libsasl2-dev libssl-dev patch python-dev python-pip vim-tiny wget \
+ python-virtualenv \
+# Enable these packages while porting to Python3 => python3-virtualenv python3-dev \
# Due to upstream bug we should use fixed version of pip
- python -m pip install --upgrade 'pip==9.0.3' \
+ && python -m pip install --upgrade 'pip==9.0.3' \
# initialize cvp sanity test suite
&& pushd cvp-sanity \
- && virtualenv venv \
+ && virtualenv --python=python2 venv \
&& . venv/bin/activate \
&& pip install -r requirements.txt \
&& deactivate \
&& popd \
# initialize cvp spt test suite
&& pushd cvp-spt \
- && virtualenv venv \
+ && virtualenv --python=python2 venv \
&& . venv/bin/activate \
&& pip install -r requirements.txt \
&& deactivate \
- && popd && \
+ && popd \
+ # initialize cvp stacklight test suite
+ && mkdir cvp-stacklight \
+ && pushd cvp-stacklight \
+ && virtualenv --system-site-packages venv \
+ && . venv/bin/activate \
+ && git clone -b $SL_TEST_BRANCH $SL_TEST_REPO \
+ && pip install ./stacklight-pytest \
+ && pip install -r stacklight-pytest/requirements.txt \
+ && deactivate \
+ && popd \
# Cleanup
- apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc && \
+ && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc && \
apt-get -y autoremove; apt-get -y clean ; rm -rf /root/.cache; rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* ; rm -rf /var/tmp/* ; rm -rfv /etc/apt/sources.list.d/* ; echo > /etc/apt/sources.list