Add neutron-fwaas-dashboard integration tests
This patch adds basic tests to verify that neutron-fwaas-dashboard is installed and could be opened. Also this patch decoupless sphinx vesrions for Python 2.7 and 3.x to fix gates. neutron-fwaas-dashboard job is added in a non-voting mode. Change-Id: I1dca0bfbdc44186fffcbe757a142c930f5bc14b4
This commit is contained in:
parent
54cdbbd5e8
commit
725e1ac496
26
.zuul.yaml
26
.zuul.yaml
@ -1,3 +1,25 @@
|
||||
- job:
|
||||
name: neutron-fwaas-dashboard-integration-tests
|
||||
parent: horizon-integration-tests
|
||||
required-projects:
|
||||
- name: openstack/horizon
|
||||
- name: openstack/neutron-fwaas
|
||||
- name: openstack/neutron-fwaas-dashboard
|
||||
roles:
|
||||
- zuul: openstack-infra/devstack
|
||||
- zuul: openstack/horizon
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
vars:
|
||||
devstack_plugins:
|
||||
neutron-fwaas: https://git.openstack.org/openstack/neutron-fwaas
|
||||
neutron-fwaas-dashboard: https://git.openstack.org/openstack/neutron-fwaas-dashboard
|
||||
devstack_services:
|
||||
horizon: true
|
||||
tox_envlist: integration
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
@ -8,3 +30,7 @@
|
||||
- openstack-python3-train-jobs-horizon
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- neutron-fwaas-dashboard-integration-tests:
|
||||
voting: false
|
||||
|
5
bindep.txt
Normal file
5
bindep.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# selenium tests
|
||||
firefox [selenium]
|
||||
xvfb [selenium platform:dpkg]
|
||||
# already part of xorg-x11-server on openSUSE
|
||||
xorg-x11-server-Xvfb [selenium platform:redhat]
|
@ -104,6 +104,7 @@ requestsexceptions==1.2.0
|
||||
rfc3986==0.3.1
|
||||
rjsmin==1.0.12
|
||||
Routes==2.3.1
|
||||
selenium==2.50.1
|
||||
semantic-version==2.3.1
|
||||
simplejson==3.5.1
|
||||
six==1.10.0
|
||||
@ -148,3 +149,4 @@ XStatic-smart-table==1.4.13.2
|
||||
XStatic-Spin==1.2.5.2
|
||||
XStatic-term.js==0.0.7.0
|
||||
XStatic-tv4==1.2.7.0
|
||||
xvfbwrapper==0.1.3
|
||||
|
4
neutron_fwaas_dashboard/test/integration/horizon.conf
Normal file
4
neutron_fwaas_dashboard/test/integration/horizon.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
is_plugin=True
|
||||
plugin_page_path=neutron_fwaas_dashboard.test.integration.pages
|
||||
plugin_page_structure='{"Project": {"Network": {"_": ["Firewall Groups"]}}}'
|
@ -0,0 +1,21 @@
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from openstack_dashboard.test.integration_tests.pages import basepage
|
||||
|
||||
|
||||
class FirewallgroupsPage(basepage.BaseNavigationPage):
|
||||
def __init__(self, driver, conf):
|
||||
super(FirewallgroupsPage, self).__init__(driver, conf)
|
||||
self._page_title = "Firewall Groups"
|
24
neutron_fwaas_dashboard/test/integration/test_basic.py
Normal file
24
neutron_fwaas_dashboard/test/integration/test_basic.py
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from openstack_dashboard.test.integration_tests import helpers
|
||||
|
||||
|
||||
class TestNeutronFWaaSDashboardInstalled(helpers.TestCase):
|
||||
|
||||
def test_alarms_page_opened(self):
|
||||
firewall_groups_page = \
|
||||
self.home_pg.go_to_project_network_firewallgroupspage()
|
||||
self.assertEqual(firewall_groups_page.page_title,
|
||||
'Firewall Groups - OpenStack Dashboard')
|
@ -8,6 +8,12 @@ hacking>=1.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
flake8-import-order==0.13 # LGPLv3
|
||||
mock>=2.0.0 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
||||
# integration tests requirements
|
||||
selenium>=2.50.1 # Apache-2.0
|
||||
xvfbwrapper>=0.1.3 #license: MIT
|
||||
testtools>=2.2.0 # MIT
|
||||
|
15
tox.ini
15
tox.ini
@ -21,7 +21,7 @@ commands =
|
||||
{[unit_tests]commands}
|
||||
|
||||
[unit_tests]
|
||||
commands = python manage.py test {posargs} --settings=neutron_fwaas_dashboard.test.settings
|
||||
commands = python manage.py test {posargs} --settings=neutron_fwaas_dashboard.test.settings --exclude-tag integration
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
@ -37,10 +37,21 @@ commands = {posargs}
|
||||
basepython = python3
|
||||
commands =
|
||||
coverage erase
|
||||
coverage run {toxinidir}/manage.py test neutron_fwaas_dashboard --settings=neutron_fwaas_dashboard.test.settings {posargs}
|
||||
coverage run {toxinidir}/manage.py test neutron_fwaas_dashboard --settings=neutron_fwaas_dashboard.test.settings --exclude-tag integration {posargs}
|
||||
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
|
||||
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
|
||||
|
||||
[testenv:integration]
|
||||
# Run integration tests only
|
||||
passenv = AVCONV_INSTALLED
|
||||
setenv =
|
||||
PYTHONHASHSEED=0
|
||||
INTEGRATION_TESTS=1
|
||||
SELENIUM_HEADLESS=1
|
||||
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=neutron_fwaas_dashboard/test/integration/horizon.conf
|
||||
basepython = python3
|
||||
commands = {envpython} {toxinidir}/manage.py test neutron_fwaas_dashboard --tag integration {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
commands = python setup.py build_sphinx
|
||||
|
Loading…
Reference in New Issue
Block a user