Native Zuul v3 dashboard-integration test

- create a native Zuul v3 job, and move it to experimental
  until it works;
- install libav-utils on dpkg systems and enable the capture
  of the video;
- adapt to the changes in OverviewPage:
  * go_to_system_flavorspage -> go_to_admin_compute_flavorspage
  * go_to_compute_imagespage -> go_to_project_compute_imagespage

The job is failing right now, but apart the increased running time,
at least the tests are now executed.

Story: 2001686
Task: 8662

Change-Id: I311203779bd3e6c6660cfe1b84e89c7dc0825c98
This commit is contained in:
Luigi Toscano 2019-02-21 00:47:34 +01:00
parent 268febe615
commit bd66017874
13 changed files with 123 additions and 8 deletions

View File

@ -9,8 +9,9 @@
jobs:
- sahara-dashboard-tox-py35dj20:
voting: false
- legacy-sahara-dashboard-dsvm-integration:
voting: false
experimental:
jobs:
- sahara-dashboard-integration
- job:
name: sahara-dashboard-tox-base
@ -28,3 +29,34 @@
parent: sahara-dashboard-tox-base
vars:
tox_envlist: py35dj20
- job:
name: sahara-dashboard-integration
parent: devstack
required-projects:
- openstack/heat
- openstack/horizon
- openstack/sahara
- openstack/sahara-plugin-ambari
- openstack/sahara-plugin-cdh
- openstack/sahara-plugin-mapr
- openstack/sahara-plugin-spark
- openstack/sahara-plugin-storm
- openstack/sahara-plugin-vanilla
- openstack/sahara-dashboard
roles:
- zuul: openstack/horizon
vars:
devstack_plugins:
sahara: 'git://git.openstack.org/openstack/sahara'
sahara-dashboard: 'git://git.openstack.org/openstack/sahara-dashboard'
heat: 'git://git.openstack.org/openstack/heat'
devstack_services:
horizon: true
tls-proxy: false
pre-run: playbooks/sahara-dashboard-integration/pre.yaml
run: playbooks/sahara-dashboard-integration/run.yaml
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$

View File

@ -34,3 +34,12 @@ python3.5 [platform:ubuntu-xenial]
uuid-dev [platform:dpkg]
zlib-devel [platform:rpm]
zlib1g-dev [platform:dpkg]
# integration tests
firefox [integrationtests]
dbus [integrationtests platform:redhat]
dbus-1 [integrationtests platform:suse]
xvfb [integrationtests platform:dpkg]
# already part of xorg-x11-server on openSUSE
xorg-x11-server-Xvfb [integrationtests platform:redhat]
libav-tools [integrationtests platform:dpkg]

View File

@ -0,0 +1,8 @@
---
- hosts: controller
roles:
- role: bindep
bindep_profile: integrationtests
become: true
- setup-selenium-tests
- setup-sahara-ui-integration

View File

@ -0,0 +1,13 @@
---
- hosts: all
strategy: linear
roles:
- orchestrate-devstack
- hosts: controller
roles:
- post-devstack-sahara-ui-integration
- role: tox
tox_environment:
AVCONV_INSTALLED: 1
tox_envlist: py27integration

View File

@ -0,0 +1,4 @@
---
devstack_base_dir: "/opt/stack"
sahara_cloud_admin: "devstack-admin"
sahara_cloud_demo: "devstack"

View File

@ -0,0 +1,7 @@
{
"plugin_labels": {
"hidden": {
"status": false
}
}
}

View File

@ -0,0 +1,10 @@
---
- name: copy the updated config snipped which enables the fake plugin
copy:
src: fake_config.json
dest: /tmp/sahara_fake_config.json
- name: change the config of the fake plugin
shell: |
openstack --os-cloud {{ sahara_cloud_admin }} --os-project-name demo \
dataprocessing plugin update fake /tmp/sahara_fake_config.json

View File

@ -0,0 +1,5 @@
---
devstack_base_dir: "/opt/stack"
sahara_cloud_image: "https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img"
# TODO: if the following option is changed, it should also be specified in tempest.conf
sahara_cloud_image_remote_path: "/tmp/xenial-server-cloudimg-amd64-disk1.img"

View File

@ -0,0 +1,5 @@
[image]
panel_type=legacy
[flavors]
panel_type=legacy

View File

@ -0,0 +1,21 @@
---
- name: download the ubuntu image file
get_url:
url: "{{ sahara_cloud_image }}"
dest: "{{ sahara_cloud_image_remote_path }}"
# enable legacy panels (two files in local/local_settings.d and a new setting file
# for the integration tests)
- name: setup the old behavior of tables for testing purposes
copy:
src: "{{ devstack_base_dir }}/horizon/openstack_dashboard/local/local_settings.d/{{ item }}.example"
dest: "{{ devstack_base_dir }}/horizon/openstack_dashboard/local/local_settings.d/{{ item }}"
remote_src: yes
with_items:
- '_20_integration_tests_scaffolds.py'
- '_2010_integration_tests_deprecated.py'
- name: setup the old behavior of panels for testing purposes
copy:
src: legacy_panels.conf
dest: "{{ devstack_base_dir }}/horizon/openstack_dashboard/test/integration_tests/local-horizon.conf"

View File

@ -35,7 +35,7 @@ class TestCRUDBase(SaharaTestCase):
self.jobtemplate_name = self.gen_name('test-job')
def create_flavor(self):
flavors_page = self.home_pg.go_to_system_flavorspage()
flavors_page = self.home_pg.go_to_admin_compute_flavorspage()
flavors_page.create_flavor(
name=self.flavor_name,
@ -47,12 +47,12 @@ class TestCRUDBase(SaharaTestCase):
self.assertTrue(flavors_page.is_flavor_present(self.flavor_name))
def delete_flavor(self):
flavors_page = self.home_pg.go_to_system_flavorspage()
flavors_page = self.home_pg.go_to_admin_compute_flavorspage()
flavors_page.delete_flavor_by_row(self.flavor_name)
self.assertFalse(flavors_page.is_flavor_present(self.flavor_name))
def create_image(self):
image_pg = self.home_pg.go_to_compute_imagespage()
image_pg = self.home_pg.go_to_project_compute_imagespage()
image_pg.create_image(
self.image_name, image_file=self.CONFIG.sahara.fake_image_location)
image_pg._wait_until(
@ -60,7 +60,7 @@ class TestCRUDBase(SaharaTestCase):
timeout=10 * 60)
def delete_image(self):
image_pg = self.home_pg.go_to_compute_imagespage()
image_pg = self.home_pg.go_to_project_compute_imagespage()
image_pg.delete_image(self.image_name)
def register_image(self):

View File

@ -22,7 +22,7 @@ class TestSaharaImageRegistry(SaharaTestCase):
def setUp(self):
super(TestSaharaImageRegistry, self).setUp()
image_pg = self.home_pg.go_to_compute_imagespage()
image_pg = self.home_pg.go_to_project_compute_imagespage()
image_pg.create_image(
IMAGE_NAME, image_file=self.CONFIG.sahara.fake_image_location)
image_pg.find_message_and_dismiss(messages.SUCCESS)
@ -52,6 +52,6 @@ class TestSaharaImageRegistry(SaharaTestCase):
"Image was not unregistered.")
def tearDown(self):
image_pg = self.home_pg.go_to_compute_imagespage()
image_pg = self.home_pg.go_to_project_compute_imagespage()
image_pg.delete_image(IMAGE_NAME)
super(TestSaharaImageRegistry, self).tearDown()

View File

@ -44,6 +44,7 @@ commands = pip install django>=2.0,<2.1
[testenv:py27integration]
basepython = python2.7
passenv = AVCONV_INSTALLED
setenv =
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1