cd /son-emu/
# trigger pep8 style check
echo "Doing flake8 style check ..."
-flake8 --exclude=.eggs,devops --ignore=E501 .
+flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 .
echo "done."
# trigger the tests
echo "Running unit tests ..."
set -e
# trigger pep8 style check
echo "Doing flake8 style check ..."
-flake8 --exclude=.eggs,devops --ignore=E501 .
+flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 .
echo "done."
# trigger the tests
echo "Running unit tests ..."
sudo pytest -v
+# do everything in Docker, like it is done by Jenkins
+docker build -t vim-emu-loc-test .
+docker run --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-loc-test pytest -v
+docker run --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-loc-test flake8 --exclude=.eggs,devops --ignore=E501,W605,W504 .
echo "done."
return 'Error stopping monitoring metric: {0} on {1}:{2}'.format(\r
metric, vnf_name, vnf_interface)\r
\r
-\r
-# get all metrics defined in the list and export it to Prometheus\r
-\r
def get_flow_metrics(self):\r
+ """\r
+ Get all metrics defined in the list and export it to Prometheus.\r
+ """\r
while self.start_monitoring:\r
\r
self.monitor_flow_lock.acquire()\r