Browse Source

Add manila-ui integration tests

This patch adds basic tests to verify that manila-ui is
installed and could be opened.

manila-ui-integration-tests job is added in a
non-voting mode.

Depends-On: https://review.openstack.org/634712
Change-Id: I67e876a5cb26637b62225fc854a906dc1a714e76
changes/12/635112/9
Ivan Kolodyazhny 2 years ago
parent
commit
019526b5f8
31 changed files with 502 additions and 2 deletions
  1. +28
    -0
      .zuul.yaml
  2. +6
    -0
      bindep.txt
  3. +2
    -0
      lower-constraints.txt
  4. +0
    -0
      manila_ui/tests/integration/__init__.py
  5. +4
    -0
      manila_ui/tests/integration/horizon.conf
  6. +0
    -0
      manila_ui/tests/integration/pages/__init__.py
  7. +0
    -0
      manila_ui/tests/integration/pages/admin/__init__.py
  8. +0
    -0
      manila_ui/tests/integration/pages/admin/share/__init__.py
  9. +20
    -0
      manila_ui/tests/integration/pages/admin/share/securityservicespage.py
  10. +20
    -0
      manila_ui/tests/integration/pages/admin/share/sharegroupsnapshotspage.py
  11. +19
    -0
      manila_ui/tests/integration/pages/admin/share/sharegroupspage.py
  12. +20
    -0
      manila_ui/tests/integration/pages/admin/share/sharegroupssnapshotspage.py
  13. +21
    -0
      manila_ui/tests/integration/pages/admin/share/sharegrouptypespage.py
  14. +21
    -0
      manila_ui/tests/integration/pages/admin/share/shareinstancespage.py
  15. +19
    -0
      manila_ui/tests/integration/pages/admin/share/sharenetworkspage.py
  16. +19
    -0
      manila_ui/tests/integration/pages/admin/share/shareserverspage.py
  17. +19
    -0
      manila_ui/tests/integration/pages/admin/share/sharesnapshotspage.py
  18. +19
    -0
      manila_ui/tests/integration/pages/admin/share/sharespage.py
  19. +21
    -0
      manila_ui/tests/integration/pages/admin/share/sharetypespage.py
  20. +0
    -0
      manila_ui/tests/integration/pages/project/__init__.py
  21. +0
    -0
      manila_ui/tests/integration/pages/project/share/__init__.py
  22. +21
    -0
      manila_ui/tests/integration/pages/project/share/securityservicespage.py
  23. +21
    -0
      manila_ui/tests/integration/pages/project/share/sharegroupsnapshotspage.py
  24. +21
    -0
      manila_ui/tests/integration/pages/project/share/sharegroupspage.py
  25. +21
    -0
      manila_ui/tests/integration/pages/project/share/sharenetworkspage.py
  26. +21
    -0
      manila_ui/tests/integration/pages/project/share/sharesnapshotspage.py
  27. +21
    -0
      manila_ui/tests/integration/pages/project/share/sharespage.py
  28. +101
    -0
      manila_ui/tests/integration/test_basic.py
  29. +2
    -2
      run_tests.sh
  30. +3
    -0
      test-requirements.txt
  31. +12
    -0
      tox.ini

+ 28
- 0
.zuul.yaml View File

@ -11,6 +11,8 @@
jobs:
- manila-ui-dsvm:
voting: false
- manila-ui-integration-tests:
voting: false
- horizon-openstack-tox-python3-django111
- horizon-openstack-tox-py27dj19
- horizon-openstack-tox-py27dj110
@ -33,3 +35,29 @@
- openstack/manila-ui
- openstack/python-manilaclient
- openstack/manila-tempest-plugin
- job:
name: manila-ui-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/manila
- name: openstack/python-manilaclient
- name: openstack/manila-ui
- name: openstack/manila-tempest-plugin
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
manila: git://git.openstack.org/openstack/manila
manila-ui: git://git.openstack.org/openstack/manila-ui
devstack_services:
horizon: true
tls-proxy: false
tox_envlist: integration

+ 6
- 0
bindep.txt View File

@ -0,0 +1,6 @@
# selenium tests
firefox [selenium]
xvfb [selenium platform:dpkg]
# already part of xorg-x11-server on openSUSE
xorg-x11-server-Xvfb [selenium platform:redhat]

+ 2
- 0
lower-constraints.txt View File

@ -94,6 +94,7 @@ requests==2.18.4
requestsexceptions==1.4.0
rfc3986==1.1.0
rjsmin==1.0.12
selenium==2.50.1
semantic-version==2.6.0
simplejson==3.13.2
six==1.10.0
@ -138,3 +139,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

+ 0
- 0
manila_ui/tests/integration/__init__.py View File


+ 4
- 0
manila_ui/tests/integration/horizon.conf View File

@ -0,0 +1,4 @@
[plugin]
is_plugin=True
plugin_page_path=manila_ui.tests.integration.pages
plugin_page_structure='{"Project": {"Share": {"_": ["Shares", "Share Snapshots", "Share Networks", "Security Services", "Share Groups", "Share Group Snapshots"]}}, "Admin": {"Share": {"_": ["Shares", "Share Snapshots", "Share Types", "Share Networks", "Security Services", "Share Servers", "Share Instances", "Share Groups", "Share Group Snapshots", "Share Group Types"]}}}'

+ 0
- 0
manila_ui/tests/integration/pages/__init__.py View File


+ 0
- 0
manila_ui/tests/integration/pages/admin/__init__.py View File


+ 0
- 0
manila_ui/tests/integration/pages/admin/share/__init__.py View File


+ 20
- 0
manila_ui/tests/integration/pages/admin/share/securityservicespage.py View File

@ -0,0 +1,20 @@
#
# 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 manila_ui.tests.integration.pages.project.share import \
securityservicespage
class SecurityservicesPage(securityservicespage.SecurityservicesPage):
pass

+ 20
- 0
manila_ui/tests/integration/pages/admin/share/sharegroupsnapshotspage.py View File

@ -0,0 +1,20 @@
#
# 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 manila_ui.tests.integration.pages.project.share import \
sharegroupsnapshotspage as sg_snapshots_page
class SharegroupsnapshotsPage(sg_snapshots_page.SharegroupsnapshotsPage):
pass

+ 19
- 0
manila_ui/tests/integration/pages/admin/share/sharegroupspage.py View File

@ -0,0 +1,19 @@
#
# 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 manila_ui.tests.integration.pages.project.share import sharegroupspage
class SharegroupsPage(sharegroupspage.SharegroupsPage):
pass

+ 20
- 0
manila_ui/tests/integration/pages/admin/share/sharegroupssnapshotspage.py View File

@ -0,0 +1,20 @@
#
# 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 manila_ui.tests.integration.pages.project.share import \
sharegroupsnapshotspage as sg_snapshots_page
class SharegroupssnapshotsPage(sg_snapshots_page.SharegroupssnapshotsPage):
pass

+ 21
- 0
manila_ui/tests/integration/pages/admin/share/sharegrouptypespage.py View File

@ -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 SharegrouptypesPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharegrouptypesPage, self).__init__(driver, conf)
self._page_title = "Share Group Types"

+ 21
- 0
manila_ui/tests/integration/pages/admin/share/shareinstancespage.py View File

@ -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 ShareinstancesPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(ShareinstancesPage, self).__init__(driver, conf)
self._page_title = "Share Instances"

+ 19
- 0
manila_ui/tests/integration/pages/admin/share/sharenetworkspage.py View File

@ -0,0 +1,19 @@
#
# 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 manila_ui.tests.integration.pages.project.share import sharenetworkspage
class SharenetworksPage(sharenetworkspage.SharenetworksPage):
pass

+ 19
- 0
manila_ui/tests/integration/pages/admin/share/shareserverspage.py View File

@ -0,0 +1,19 @@
#
# 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 ShareserversPage(basepage.BaseNavigationPage):
pass

+ 19
- 0
manila_ui/tests/integration/pages/admin/share/sharesnapshotspage.py View File

@ -0,0 +1,19 @@
#
# 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 manila_ui.tests.integration.pages.project.share import sharesnapshotspage
class SharesnapshotsPage(sharesnapshotspage.SharesnapshotsPage):
pass

+ 19
- 0
manila_ui/tests/integration/pages/admin/share/sharespage.py View File

@ -0,0 +1,19 @@
#
# 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 manila_ui.tests.integration.pages.project.share import sharespage
class SharesPage(sharespage.SharesPage):
pass

+ 21
- 0
manila_ui/tests/integration/pages/admin/share/sharetypespage.py View File

@ -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 SharetypesPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharetypesPage, self).__init__(driver, conf)
self._page_title = "Share Types"

+ 0
- 0
manila_ui/tests/integration/pages/project/__init__.py View File


+ 0
- 0
manila_ui/tests/integration/pages/project/share/__init__.py View File


+ 21
- 0
manila_ui/tests/integration/pages/project/share/securityservicespage.py View File

@ -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 SecurityservicesPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SecurityservicesPage, self).__init__(driver, conf)
self._page_title = "Security Services"

+ 21
- 0
manila_ui/tests/integration/pages/project/share/sharegroupsnapshotspage.py View File

@ -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 SharegroupsnapshotsPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharegroupsnapshotsPage, self).__init__(driver, conf)
self._page_title = "Share Group Snapshots"

+ 21
- 0
manila_ui/tests/integration/pages/project/share/sharegroupspage.py View File

@ -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 SharegroupsPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharegroupsPage, self).__init__(driver, conf)
self._page_title = "Share Groups"

+ 21
- 0
manila_ui/tests/integration/pages/project/share/sharenetworkspage.py View File

@ -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 SharenetworksPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharenetworksPage, self).__init__(driver, conf)
self._page_title = "Share Networks"

+ 21
- 0
manila_ui/tests/integration/pages/project/share/sharesnapshotspage.py View File

@ -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 SharesnapshotsPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharesnapshotsPage, self).__init__(driver, conf)
self._page_title = "Share Snapshots"

+ 21
- 0
manila_ui/tests/integration/pages/project/share/sharespage.py View File

@ -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 SharesPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(SharesPage, self).__init__(driver, conf)
self._page_title = "Shares"

+ 101
- 0
manila_ui/tests/integration/test_basic.py View File

@ -0,0 +1,101 @@
#
# 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 TestManilaDashboardInstalled(helpers.TestCase):
def test_shares_page_opened(self):
shares_page = self.home_pg.go_to_project_share_sharespage()
self.assertEqual(shares_page.page_title,
'Shares - OpenStack Dashboard')
def test_share_snapshots_page_opened(self):
s_snaps_page = self.home_pg.go_to_project_share_sharesnapshotspage()
self.assertEqual(s_snaps_page.page_title,
'Share Snapshots - OpenStack Dashboard')
def test_share_networks_page_opened(self):
s_networks_page = self.home_pg.go_to_project_share_sharenetworkspage()
self.assertEqual(s_networks_page.page_title,
'Share Networks - OpenStack Dashboard')
def test_security_services_page_opened(self):
sec_serv_page = self.home_pg.go_to_project_share_securityservicespage()
self.assertEqual(sec_serv_page.page_title,
'Security Services - OpenStack Dashboard')
def test_share_groups_page_opened(self):
share_groups_page = self.home_pg.go_to_project_share_sharegroupspage()
self.assertEqual(share_groups_page.page_title,
'Share Groups - OpenStack Dashboard')
def test_share_group_snapthots_page_opened(self):
sg_s_page = self.home_pg.go_to_project_share_sharegroupsnapshotspage()
self.assertEqual(sg_s_page.page_title,
'Share Group Snapshots - OpenStack Dashboard')
class TestManilaAdminDashboardInstalled(helpers.AdminTestCase):
def test_shares_page_opened(self):
shares_page = self.home_pg.go_to_admin_share_sharespage()
self.assertEqual(shares_page.page_title,
'Shares - OpenStack Dashboard')
def test_share_snapshots_page_opened(self):
s_snapshots_page = self.home_pg.go_to_admin_share_sharesnapshotspage()
# TODO(e0ne): fix page title and test
self.assertEqual(s_snapshots_page.page_title,
'Shares - OpenStack Dashboard')
def test_share_snapshot_types_page_opened(self):
share_types_page = (
self.home_pg.go_to_admin_share_sharetypespage())
self.assertEqual(share_types_page.page_title,
'Share Types - OpenStack Dashboard')
def test_share_networks_page_opened(self):
s_networks_page = self.home_pg.go_to_admin_share_sharenetworkspage()
self.assertEqual(s_networks_page.page_title,
'Share Networks - OpenStack Dashboard')
def test_security_services_page_opened(self):
sec_serv_page = self.home_pg.go_to_admin_share_securityservicespage()
self.assertEqual(sec_serv_page.page_title,
'Security Services - OpenStack Dashboard')
def test_share_servers_page_opened(self):
share_serv_page = self.home_pg.go_to_admin_share_shareserverspage()
self.assertEqual(share_serv_page.page_title,
'Share Servers - OpenStack Dashboard')
def test_share_instences_page_opened(self):
sec_serv_page = self.home_pg.go_to_admin_share_shareinstancespage()
self.assertEqual(sec_serv_page.page_title,
'Share Instances - OpenStack Dashboard')
def test_share_groups_page_opened(self):
share_groups_page = self.home_pg.go_to_admin_share_sharegroupspage()
self.assertEqual(share_groups_page.page_title,
'Share Groups - OpenStack Dashboard')
def test_share_group_snapthots_page_opened(self):
sg_s_page = self.home_pg.go_to_admin_share_sharegroupsnapshotspage()
self.assertEqual(sg_s_page.page_title,
'Share Group Snapshots - OpenStack Dashboard')
def test_share_group_types_page_opened(self):
sg_types_page = self.home_pg.go_to_admin_share_sharegrouptypespage()
self.assertEqual(sg_types_page.page_title,
'Share Group Types - OpenStack Dashboard')

+ 2
- 2
run_tests.sh View File

@ -331,7 +331,7 @@ function run_tests {
function run_tests_subset {
project=`echo $testargs | awk -F. '{print $1}'`
${command_wrapper} python $root/manage.py test --settings=$project.tests.settings $testopts $testargs
${command_wrapper} python $root/manage.py test --settings=$project.tests.settings --exclude-tag integration $testopts $testargs
}
function run_tests_all {
@ -344,7 +344,7 @@ function run_tests_all {
${command_wrapper} python -m coverage.__main__ erase
coverage_run="python -m coverage.__main__ run -p"
fi
${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.tests.settings $testopts
${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.tests.settings --exclude-tag integration $testopts
# get results of the Horizon tests
MANILA_UI_RESULT=$?


+ 3
- 0
test-requirements.txt View File

@ -13,3 +13,6 @@ testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
reno>=2.5.0 # Apache-2.0
# integration tests requirements
selenium>=2.50.1 # Apache-2.0
xvfbwrapper>=0.1.3 #license: MIT

+ 12
- 0
tox.ini View File

@ -27,6 +27,18 @@ commands =
pip install {env:HORIZON_REPO:git+git://git.openstack.org/openstack/horizon}
{[testenv]commands}
RIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf
[testenv:integration]
# Run integration tests only
passenv = AVCONV_INSTALLED
setenv =
PYTHONHASHSEED=0
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf
basepython = python2.7
commands = {envpython} {toxinidir}/manage.py test manila_ui --settings=manila_ui.tests.settings --tag integration
[testenv:pep8]
basepython = python3
commands = flake8


Loading…
Cancel
Save