pytest-based selenium tests fix conf. variables and import fixtures
Change-Id: Ifd54169a5dcc8ac47970903c90633c917afd24d1
This commit is contained in:
parent
638d411637
commit
6981184a15
@ -12,9 +12,14 @@
|
||||
from oslo_utils import uuidutils
|
||||
import pytest
|
||||
from selenium.common import exceptions
|
||||
import test_volumes
|
||||
|
||||
from openstack_dashboard.test.selenium import widgets
|
||||
|
||||
# Imported fixtures
|
||||
volume_name = test_volumes.volume_name
|
||||
new_volume_demo = test_volumes.new_volume_demo
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def instance_name():
|
||||
@ -41,7 +46,7 @@ def new_instance_admin(instance_name, openstack_admin, config):
|
||||
|
||||
instance = openstack_admin.create_server(
|
||||
instance_name,
|
||||
image=config.image.images_list,
|
||||
image=config.image.images_list[0],
|
||||
flavor=config.launch_instances.flavor,
|
||||
availability_zone=config.launch_instances.available_zone,
|
||||
network=config.network.external_network,
|
||||
@ -104,7 +109,7 @@ def delete_volume_on_instance_delete(driver, required_state):
|
||||
|
||||
def test_create_instance_demo(login, driver, instance_name,
|
||||
clear_instance_demo, config):
|
||||
image = config.launch_instances.image_name
|
||||
image = config.image.images_list[0]
|
||||
network = config.network.external_network
|
||||
flavor = config.launch_instances.flavor
|
||||
|
||||
@ -216,7 +221,7 @@ def test_delete_instance_demo(login, driver, instance_name,
|
||||
|
||||
def test_create_instance_admin(login, driver, instance_name,
|
||||
clear_instance_admin, config):
|
||||
image = config.launch_instances.image_name
|
||||
image = config.image.images_list[0]
|
||||
network = config.network.external_network
|
||||
flavor = config.launch_instances.flavor
|
||||
|
||||
|
@ -25,7 +25,7 @@ def new_volume_demo(volume_name, openstack_demo, config):
|
||||
|
||||
volume = openstack_demo.create_volume(
|
||||
name=volume_name,
|
||||
image=config.launch_instances.image_name,
|
||||
image=config.image.images_list[0],
|
||||
size=1,
|
||||
wait=True,
|
||||
)
|
||||
@ -38,7 +38,7 @@ def new_volume_admin(volume_name, openstack_admin, config):
|
||||
|
||||
volume = openstack_admin.create_volume(
|
||||
name=volume_name,
|
||||
image=config.launch_instances.image_name,
|
||||
image=config.image.images_list[0],
|
||||
size=1,
|
||||
wait=True,
|
||||
)
|
||||
@ -99,7 +99,7 @@ def test_create_empty_volume_demo(login, driver, volume_name,
|
||||
|
||||
def test_create_volume_from_image_demo(login, driver, volume_name,
|
||||
clear_volume_demo, config):
|
||||
image_source_name = "cirros-0.6.2-x86_64-disk (20.4 MB)"
|
||||
image_source_name = config.launch_instances.image_name
|
||||
|
||||
login('user')
|
||||
url = '/'.join((
|
||||
|
Loading…
Reference in New Issue
Block a user