summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-01 09:10:02 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-01 19:13:53 +0100
commit5a623d7d0c94456b133edb07b03f9a749d8efe88 (patch)
tree85079758bdb1531a39e6872c925574d0e72d1f81
parent22b8299e29f87158c4675892b9c3189d9eb35ba7 (diff)
Switch from functest to Xtesting
It also fixes logging.ini and tox.ini. Change-Id: I3001dd847d0cd4bcffb7e466ba1cf5a71705f636 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/Dockerfile17
-rw-r--r--docker/logging.ini48
-rw-r--r--functest_kubernetes/k8stest.py2
-rw-r--r--requirements.txt2
-rw-r--r--tox.ini15
-rw-r--r--upper-constraints.txt1
6 files changed, 44 insertions, 41 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d860bb93..34e75142 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,9 +1,10 @@
-FROM opnfv/functest-core
+FROM alpine:3.7
ARG BRANCH=master
ARG K8S_TAG=v1.7.3
+ARG OPENSTACK_TAG=stable/pike
-RUN apk --no-cache add --update make bash go \
+RUN apk --no-cache add --update make py-pip bash git go \
grep rsync linux-headers musl-dev findutils && \
git clone https://github.com/kubernetes/kubernetes /src/k8s.io/kubernetes && \
(cd /src/k8s.io/kubernetes && git checkout $K8S_TAG) && \
@@ -13,8 +14,12 @@ RUN apk --no-cache add --update make bash go \
mv _output/bin/kubectl /usr/local/bin) && \
git clone https://gerrit.opnfv.org/gerrit/functest-kubernetes /src/functest-kubernetes && \
(cd /src/functest-kubernetes && git fetch origin $BRANCH && git checkout FETCH_HEAD) && \
- pip install /src/functest-kubernetes && \
- rm -rf /src/k8s.io/kubernetes/.git /src/functest-kubernetes
-COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
-COPY logging.ini /usr/lib/python2.7/site-packages/functest/ci/logging.ini
+ pip install /src/functest-kubernetes \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt \
+ -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG && \
+ rm -rf /src/k8s.io/kubernetes/.git /src/functest-kubernetes && \
+ bash -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
+ ln -s /var/lib/xtesting /home/opnfv/functest
+COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
+COPY logging.ini /usr/lib/python2.7/site-packages/xtesting/ci/logging.ini
CMD ["run_tests", "-t", "all"]
diff --git a/docker/logging.ini b/docker/logging.ini
index 36e0bb49..579f1a48 100644
--- a/docker/logging.ini
+++ b/docker/logging.ini
@@ -1,8 +1,8 @@
[loggers]
-keys=root,functest,functest_kubernetes,k8s_smoke,k8s_conformance
+keys=root,xtesting,xci,xcore,energy,xutils,functest_kubernetes
[handlers]
-keys=console,wconsole,file,null,k8s_smoke_logfile,k8s_conformance_logfile
+keys=console,wconsole,file,null
[formatters]
keys=standard
@@ -11,25 +11,35 @@ keys=standard
level=NOTSET
handlers=null
-[logger_functest_kubernetes]
+[logger_xtesting]
level=NOTSET
-handlers=console,file
-qualname=functest_kubernetes
+handlers=file
+qualname=xtesting
+
+[logger_xci]
+level=NOTSET
+handlers=console
+qualname=xtesting.ci
-[logger_functest]
+[logger_xcore]
level=NOTSET
handlers=console
-qualname=functest
+qualname=xtesting.core
-[logger_k8s_smoke]
+[logger_energy]
level=NOTSET
-handlers=k8s_smoke_logfile
-qualname=k8s_smoke
+handlers=wconsole
+qualname=xtesting.energy
-[logger_k8s_conformance]
+[logger_xutils]
level=NOTSET
-handlers=k8s_conformance_logfile
-qualname=k8s_conformance
+handlers=wconsole
+qualname=xtesting.utils
+
+[logger_functest_kubernetes]
+level=NOTSET
+handlers=wconsole,file
+qualname=functest_kubernetes
[handler_null]
class=NullHandler
@@ -55,18 +65,6 @@ level=DEBUG
formatter=standard
args=("/home/opnfv/functest/results/functest-kubernetes.log",)
-[handler_k8s_smoke_logfile]
-class=FileHandler
-level=DEBUG
-formatter=standard
-args=("/home/opnfv/functest/results/k8s_smoke.log",)
-
-[handler_k8s_conformance_logfile]
-class=FileHandler
-level=DEBUG
-formatter=standard
-args=("/home/opnfv/functest/results/k8s_conformance.log",)
-
[formatter_standard]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=
diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py
index 8fe8d5cd..e5f19f95 100644
--- a/functest_kubernetes/k8stest.py
+++ b/functest_kubernetes/k8stest.py
@@ -20,7 +20,7 @@ import re
import subprocess
import time
-from functest.core import testcase
+from xtesting.core import testcase
LOGGER = logging.getLogger(__name__)
diff --git a/requirements.txt b/requirements.txt
index 05b476e6..ac3fdd23 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,4 +2,4 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-functest
+xtesting # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 6b90f068..cd2311a3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,14 +1,20 @@
[tox]
-envlist = pep8,pylint,yamllint,py27,py35,cover
+envlist = pep8,pylint,yamllint,py27,py35
[testenv]
usedevelop = True
deps =
-chttps://git.opnfv.org/functest/plain/upper-constraints.txt
- -c{toxinidir}/upper-constraints.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
+commands = nosetests --with-xunit \
+ --with-coverage \
+ --cover-tests \
+ --cover-package=functest_kubernetes \
+ --cover-xml \
+ --cover-html \
+ functest_kubernetes
[testenv:pep8]
basepython = python2.7
@@ -28,8 +34,3 @@ files =
docker
commands =
yamllint {[testenv:yamllint]files}
-
-[testenv:cover]
-basepython = python2.7
-commands = nosetests --with-coverage --cover-tests \
- --cover-package functest_kubernetes functest_kubernetes
diff --git a/upper-constraints.txt b/upper-constraints.txt
deleted file mode 100644
index d3df60a0..00000000
--- a/upper-constraints.txt
+++ /dev/null
@@ -1 +0,0 @@
-git+https://gerrit.opnfv.org/gerrit/functest#egg=functest