Horizon

Tests launching

py.test stepler/horizon

Special environment variables:

  • VIRTUAL_DISPLAY says py.test to use xvfb. Not specified by default.

Required software:

  • firefox v45 or less - modern firefox versions require geckodriver, which is unstable still
  • avconv - is used to capture tests video
  • xvfb - optionally, if you are going to use virtual X11 display

Note

It requires X11 display to launch firefox. With server distributive it’s recommended to use xvfb. Environment variable DISPLAY should be defined and point to actual X11 display. Otherwise tests will be failed.

Horizon conftest

Contains fixtures specific for horizon (UI testing).

stepler.horizon.conftest.admin_only(credentials, admin_project_resources)[source]

Function fixture to set admin credentials to log in horizon.

Note

It should be used only in test and never in other fixture in order to avoid undefined behavior.

stepler.horizon.conftest.allocate_floating_ip(floating_ips_steps_ui)[source]

Fixture to create floating IP with options.

Can be called several times during test.

Parameters:floating_ips_steps_ui (object) – instantiated floating ips steps
Yields:function – function to allocate floating IP
stepler.horizon.conftest.any_one(request, credentials, admin_project_resources, user_project_resources)[source]

Session fixture to define user to log in horizon.

Parameters:request (object) – pytest request parametrized with values admin and user.

Note

It should be used only in test and never in other fixture in order to avoid undefined behavior.

stepler.horizon.conftest.api_access_steps_ui(login, horizon)[source]

Fixture to get api access steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI api access steps

Return type:

stepler.horizon.steps.ApiAccessSteps

stepler.horizon.conftest.auth_steps(horizon)[source]

Function fixture to get auth steps.

Parameters:horizon (object) – instantiated horizon web application
Returns:instantiated auth steps
Return type:stepler.horizon.steps.AuthSteps
stepler.horizon.conftest.container(create_container_ui)[source]

Fixture to create container with default options before test.

Parameters:
  • create_container_ui (function) – function to create container
  • options (with) –
Returns:

dict with container name

Return type:

AttrDict

stepler.horizon.conftest.containers_steps_ui(login, horizon)[source]

Fixture to get containers steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated containers steps

Return type:

stepler.horizon.steps.ContainersSteps

stepler.horizon.conftest.create_container_ui(containers_steps_ui)[source]

Callable fixture to create container with options.

Can be called several times during test.

Parameters:containers_steps_ui (obj) – instantiated containers steps
Yields:function – function to create container with options
stepler.horizon.conftest.defaults_steps_ui(login, horizon)[source]

Fixture to get defaults steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI defaults steps

Return type:

stepler.horizon.steps.DefaultsSteps

stepler.horizon.conftest.flavors_steps_ui(flavor_steps, login, horizon)[source]

Fixture to get flavors steps.

flavor_steps instance is used for flavors cleanup.

Parameters:
  • flavor_steps (object) – instantiated flavor steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated flavors steps

Return type:

stepler.horizon.steps.FlavorsSteps

stepler.horizon.conftest.floating_ip(allocate_floating_ip)[source]

Fixture to create floating IP with default options before test.

Parameters:allocate_floating_ip (function) – function to allocate floating IP
Returns:floating IP
Return type:AttrDict
stepler.horizon.conftest.floating_ips_steps_ui(network_setup, login, horizon)[source]

Fixture to get floating IPs steps.

Parameters:
  • network_setup (None) – should set up network before steps using
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated floating IP steps

Return type:

stepler.horizon.steps.FloatingIPsSteps

stepler.horizon.conftest.horizon()[source]

Function fixture to launch browser and open horizon page.

It launches browser before tests and closes after.

Yields:stepler.horizon.app.Horizon – instantiated horizon web application
stepler.horizon.conftest.horizon_autouse(logger, video_capture, admin_project_resources, user_project_resources)[source]

Function fixture to aggregate and execute other fixtures.

It is used as one entry point for fixtures, which would like to be executed as autouse.

stepler.horizon.conftest.horizon_create_security_group(neutron_security_group_steps)[source]

Callable function fixture to create security group with options.

Parameters:neutron_security_group_steps (object) – instantiated security groups steps
Returns:function to create security group
Return type:function
stepler.horizon.conftest.horizon_image(horizon_images)[source]

Fixture to create cirros image with default options.

Parameters:horizon_images (list) – list of created images
Returns:glance image
Return type:object
stepler.horizon.conftest.horizon_images(request, get_glance_steps, uncleanable, credentials)[source]

Fixture to create cirros images with default options.

Parameters:
  • request (object) – py.test’s SubRequest instance
  • get_glance_steps (function) – function to get glance steps
  • uncleanable (AttrDict) – data structure with skipped resources
  • credentials (object) – CredentialsManager instance
Returns:

images list

Return type:

list

stepler.horizon.conftest.horizon_security_group(horizon_create_security_group)[source]

Function fixture to create security group before test.

Args: horizon_create_security_group (function): function to create security

group with options.
Returns:security group
Return type:dict
stepler.horizon.conftest.horizon_server(horizon_servers)[source]

Function fixture to create server with default options before test.

Parameters:horizon_servers (list) – list with one nova server
Returns:nova server
Return type:object
stepler.horizon.conftest.horizon_server_with_private_image(horizon_servers_with_private_image)[source]

Function fixture to create server with default options before test.

Parameters:horizon_servers (list) – list with one nova server
Returns:nova server
Return type:object
stepler.horizon.conftest.horizon_servers(request, cirros_image, security_group, net_subnet_router, flavor_steps, server_steps)[source]

Function fixture to create servers with default options before test.

Parameters:
  • request (object) – py.test’s SubRequest instance
  • cirros_image (object) – cirros image from glance
  • security_group (object) – nova security group
  • net_subnet_router (tuple) – neutron network, subnet, router
  • flavor_steps (FlavorSteps) – instantiated flavor steps
  • server_steps (ServerSteps) – instantiated server steps
Returns:

nova servers

Return type:

list

stepler.horizon.conftest.horizon_servers_with_private_image(request, cirros_image_private, security_group, net_subnet_router, flavor_steps, server_steps)[source]

Function fixture to create servers with default options before test.

Parameters:
  • request (object) – py.test’s SubRequest instance
  • cirros_image (object) – cirros image from glance
  • security_group (object) – nova security group
  • net_subnet_router (tuple) – neutron network, subnet, router
  • flavor_steps (FlavorSteps) – instantiated flavor steps
  • server_steps (ServerSteps) – instantiated server steps
Returns:

nova servers

Return type:

list

stepler.horizon.conftest.host_aggregates_steps_ui(login, horizon)[source]

Fixture to get host aggregates steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI

host aggregates steps

Return type:

stepler.horizon.steps.HostAggregatesSteps

stepler.horizon.conftest.images_steps_ui(glance_steps, login, horizon)[source]

Fixture to get images steps.

glance_steps instance is used for images cleanup.

Parameters:
  • glance_steps (GlanceSteps) – instantiated glance steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI images steps

Return type:

stepler.horizon.steps.ImagesSteps

stepler.horizon.conftest.instances_steps_ui(network_setup, server_steps, login, horizon)[source]

Function fixture to get instances steps.

server_steps instance is used for servers cleanup.

Parameters:
  • network_setup (None) – should set up network before steps using
  • server_steps (ServerSteps) – instantiated server steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated instances steps

Return type:

stepler.horizon.steps.InstancesSteps

stepler.horizon.conftest.keypairs_steps_ui(keypair_steps, login, horizon)[source]

Fixture to get keypairs steps.

keypair_steps instance is used for keypairs cleanup.

Parameters:
  • keypair_steps (object) – instantiated keypair steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI keypairs steps

Return type:

stepler.horizon.steps.KeypairsSteps

stepler.horizon.conftest.logger(report_dir)[source]

Fixture to put test log in report.

stepler.horizon.conftest.login(auth_steps, credentials)[source]

Function fixture to log in horizon.

Logs in horizon UI before test. Logs out after test.

Parameters:auth_steps (AuthSteps) – instantiated auth steps
stepler.horizon.conftest.namespaces_steps_ui(login, horizon)[source]

Fixture to get namespaces steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI namespaces steps

Return type:

stepler.horizon.steps.NamespacesSteps

stepler.horizon.conftest.network_setup(credentials, admin_project_resources, user_project_resources, get_network_steps, get_router_steps, get_subnet_steps, uncleanable)[source]

Session fixture to setup network.

For generated user and admin projects it creates internal network, subnet and router and joins them with external network via router. After tests it deletes created router, network and subnet.

Parameters:
  • credentials (obj) – CredentialsManager instance
  • admin_project_resources (AttrDict) – admin project resources
  • user_project_resources (AttrDict) – user project resources
  • get_network_steps (function) – function to get network steps
  • get_router_steps (function) – function to get router steps
  • get_subnet_steps (function) – function to get subnet steps
  • uncleanable (AttrDict) – data structure with skipped resources
stepler.horizon.conftest.networks_steps_ui(network_setup, network_steps, login, horizon)[source]

Functional fixture to get UI networks steps.

network_steps instance is used for networks cleanup.

Parameters:
  • network_setup (None) – should set up network before steps using
  • network_steps (NetworkSteps) – instantiated network steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI network steps

Return type:

NetworkSteps

stepler.horizon.conftest.new_user_login(login, new_user_with_project, auth_steps)[source]

Fixture to log in as new user.

Parameters:
  • login (None) – should log in horizon before steps using
  • new_user_with_project (AttrDict) – dict with username, password and project name
  • auth_steps (AuthSteps) – instantiated auth steps
Yields:

AttrDict – dict with username, password and project name

stepler.horizon.conftest.overview_steps_ui(login, horizon)[source]

Fixture to get overview steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI overview steps

Return type:

stepler.horizon.steps.OverviewSteps

stepler.horizon.conftest.project_name_non_ascii(projects_steps_ui, admin_project_resources)[source]

Fixture to create project with non ascii name and switch to it.

stepler.horizon.conftest.projects_steps_ui(login, horizon)[source]

Fixture to get projects steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated UI projects steps

Return type:

stepler.horizon.steps.ProjectsSteps

stepler.horizon.conftest.report_dir(request)[source]

Create report directory to put test logs.

stepler.horizon.conftest.routers_steps_ui(network_setup, router_steps, login, horizon)[source]

Function fixture to get routers steps.

router_steps instance is used for routers cleanup.

Parameters:
  • network_setup (None) – should set up network before steps using
  • router_steps (RouterSteps) – instantiated router steps
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated routers steps

Return type:

RoutersSteps

stepler.horizon.conftest.security_groups_steps_ui(login, horizon)[source]

Fixture to get security groups steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
stepler.horizon.conftest.settings_steps_ui(login, horizon)[source]

Get settings steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated settings steps

Return type:

stepler.horizon.steps.SettingsSteps

stepler.horizon.conftest.stacks_steps_ui(stack_steps, login, horizon)[source]

Functional fixture to get UI stacks steps. :param stack_steps: instantiated stack steps :type stack_steps: StackSteps :param login: should log in horizon before steps using :type login: None :param horizon: instantiated horizon web application :type horizon: Horizon

Returns:instantiated stacks steps
Return type:stepler.horizon.steps.StacksSteps
stepler.horizon.conftest.update_defaults(defaults_steps_ui)[source]

Callable fixture to update defaults.

Parameters:defaults_steps_ui (DefaultsSteps) – instantiated defaults steps
Yields:function – function to update defaults
stepler.horizon.conftest.update_settings(settings_steps_ui)[source]

Update settings.

Parameters:settings_steps (SettingsSteps) – instantiated settings steps
Yields:function – function to update user settings
stepler.horizon.conftest.user_only(credentials, user_project_resources)[source]

Function fixture to set user credentials to log in horizon.

Note

It should be used only in test and never in other fixture in order to avoid undefined behavior.

stepler.horizon.conftest.users_steps_ui(login, horizon)[source]

Fixture to get users steps.

Parameters:
  • login (None) – should log in horizon before steps using
  • horizon (Horizon) – instantiated horizon web application
Returns:

instantiated users steps

Return type:

stepler.horizon.steps.UsersSteps

stepler.horizon.conftest.video_capture(virtual_display, report_dir)[source]

Capture video of test.

stepler.horizon.conftest.virtual_display(request)[source]

Run test in virtual X server if env var is defined.

stepler.horizon.conftest.volume_types_steps_ui(horizon, login)[source]

Get volume types UI steps.

Parameters:
  • horizon (Horizon) – instantiated horizon web application
  • login (None) – should log in horizon before steps using
stepler.horizon.conftest.volumes_steps_ui(volume_steps, snapshot_steps, backup_steps, login, horizon)[source]

Fixture to get volumes steps.

volume_steps instance is used for volumes cleanup. snapshot_steps instance is used for snapshots cleanup. backup_steps instance is used for backups cleanup.

Parameters:
  • volume_steps (VolumeSteps) – instantiated volume steps
  • snapshot_steps (SnapshotSteps) – instantiated snapshot steps
  • backup_steps (BackupSteps) – instantiated backup steps
  • horizon (Horizon) – instantiated horizon web application
  • login (None) – should log in horizon before steps using

Horizon steps

Contains steps specific for horizon (UI testing).

class stepler.horizon.steps.ApiAccessSteps(app)[source]

Api access steps.

download_ec2(check=True)[source]

Step to download ec2 file.

download_rc_v2(check=True)[source]

Step to download RCv2 file.

download_rc_v2_via_menu(check=True)[source]

Step to download RCv2 file via menu.

download_rc_v3(check=True)[source]

Step to download RCv3 file.

download_rc_v3_via_menu(check=True)[source]

Step to download RCv3 file via menu.

view_credentials(check=True)[source]

Step to view credentials.

class stepler.horizon.steps.AuthSteps(app)[source]

Authentication steps.

check_alert_present()[source]

Step to check alert message is present.

check_login_time()[source]

Step to check time authorizing into Horizon.

login(username, password, check=True)[source]

Step to log in user account.

Parameters:
  • username (-) – string, user name.
  • password (-) – string, user password.
logout(check=True)[source]

Step to log out user account.

class stepler.horizon.steps.ContainersSteps(app)[source]

Containers steps.

check_container_name_volume_backups()[source]

Step to check that container has name ‘volumebackups’.

check_folder_available_by_public_url(folder_name, public_url)[source]

Step to check that folder is available by public URL.

create_container(container_name, public=False, check=True)[source]

Step to create container.

create_folder(folder_name, check=True)[source]

Step to create folder.

delete_container(container_name, check=True)[source]

Step to delete container.

delete_file(file_name, check=True)[source]

Step to delete file.

delete_folder(folder_name, check=True)[source]

Step to delete folder.

get_container(container_name)[source]

Step to enter to container.

get_container_info(container_name)[source]

Step to get container info.

get_folder(folder_name)[source]

Step to enter to folder.

upload_file(file_path, file_name=None, check=True)[source]

Step to upload file.

class stepler.horizon.steps.DefaultsSteps(app)[source]

Access & security steps.

get_defaults(defaults)[source]

Step to get defaults.

update_defaults(defaults, check=True)[source]

Step to update defaults.

class stepler.horizon.steps.FlavorsSteps(app)[source]

Flavors steps.

create_flavor(flavor_name=None, cpu_count=1, ram=1024, root_disk=1, check=True)[source]

Step to create flavor.

delete_flavor(flavor_name, check=True)[source]

Step to delete flavor.

delete_flavors(flavor_names, check=True)[source]

Step to delete flavors as batch.

get_metadata(flavor_name)[source]

Step to get flavor metadata.

modify_access(flavor_name, project, check=True)[source]

Step to modify flavor access.

update_flavor(flavor_name, new_flavor_name=None, check=True)[source]

Step to update flavor.

update_metadata(flavor_name, metadata, check=True)[source]

Step to update flavor metadata.

class stepler.horizon.steps.FloatingIPsSteps(app)[source]

Floating IPs steps.

allocate_floating_ip(check=True)[source]

Step to allocate floating IP.

associate_floating_ip(ip, instance_name, check=True)[source]

Step to associate floating IP.

release_floating_ip(ip, check=True)[source]

Step to release floating IP.

class stepler.horizon.steps.HostAggregatesSteps(app)[source]

Host aggregates steps.

create_host_aggregate(host_aggregate_name=None, check=True)[source]

Step to create host aggregate.

delete_host_aggregate(host_aggregate_name, check=True)[source]

Step to delete host_aggregate.

delete_host_aggregates(host_aggregate_names, check=True)[source]

Step to delete host aggregates.

class stepler.horizon.steps.ImagesSteps(app)[source]

Images steps.

add_metadata(image_name, metadata, check=True)[source]

Step to add image metadata.

Parameters:
  • image_name (str) – image name
  • metadata (dict) – image metadata {name: value}
  • check (bool) – flag whether to check step or not
Raises:
  • TimeoutExpired – if image status is not ‘Active’
  • AssertionError – if check failed
check_flavors_limited_in_launch_instance_form(image_name, disk_size, ram_size)[source]

Step to check flavors are limited in launch instance form.

check_image_info(image_name, expected_description=None, expected_metadata=None)[source]

Step to check image detailed info.

This step checks that values of description/metadata in detailed info are correct. For ‘None’ values, these data must be missing.

Parameters:
  • image_name (str) – image name
  • expected_description (str|None) – expected image description
  • expected_metadata (dict|None) – expected image metadata {name: value} (max = 2 keys)
Raises:

AssertionError – if real and expected data are different

check_image_present(image_name, timeout=None)[source]

Step to check image is present.

check_images_pagination(image_names)[source]

Step to check images pagination.

check_non_public_image_not_visible(image_name)[source]

Step to check non-public image is not visible for other projects.

Parameters:image_name (str) – image name
Raises:AssertionError – if image is available in public images list
check_page_is_available(image_name, check=True)[source]

Step to check page is available and then close it.

Parameters:image_name – image name
check_public_image_visible(image_name)[source]

Step to check public image is visible.

create_image(image_name, image_description=None, image_url='http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img', image_file=None, disk_format='QCOW2', min_disk=None, min_ram=None, protected=False, big_image=False, check=True)[source]

Step to create image.

Parameters:
  • image_name (str) – image name
  • image_description (object|None) – image description
  • image_url (str) – URL of image location
  • image_file (str) – path of image file
  • disk_format (str) – disk format
  • min_disk (int) – min disk size (in Gb)
  • min_ram (int) – min RAM size (in Mb)
  • protected (bool) – indicator whether image is protected or not
  • big_image (bool) – indicator whether image has big size or not
  • check (bool) – flag whether to check step or not
create_volume(image_name, volume_name, check=True)[source]

Step to create volume from image.

delete_image(image_name, check=True)[source]

Step to delete image.

delete_images(image_names, check=True)[source]

Step to delete images.

delete_metadata(image_name, metadata, check=True)[source]

Step to delete metadata.

Parameters:
  • image_name (str) – image name
  • metadata (dict) – image metadata {name: value}
  • check (bool) – flag whether to check step or not
Raises:

TimeoutExpired – if image status is not ‘Active’

get_metadata(image_name)[source]

Step to get image metadata.

launch_instance(image_name, instance_name, network_name, flavor, check=True)[source]

Step to launch instance from image.

Step to open link of image info in new tab.

Parameters:image_name (str) – image name
switch_to_new_tab(check=True)[source]

Step to switch to new tab.

update_image(image_name, new_image_name=None, description=None, min_disk=None, min_ram=None, protected=False, check=True)[source]

Step to update image.

Parameters:
  • image_name (str) – image name
  • new_image_name (str) – new image name
  • description (str|None) – image description
  • metadata (dict|None) – image metadata {name: value} (max = 2 keys)
  • min_disk (int|None) – minimal disk size
  • min_ram (int|None) – minimal ram
  • protected (bool) – flag whether to set protected or not
  • check – flag whether to check step or not
view_image(image_name, check=True)[source]

Step to view image.

class stepler.horizon.steps.InstancesSteps(app)[source]

Instances steps.

add_security_group(instance_name, security_group_name, check=True)[source]

Step to add security group.

admin_delete_instance(instance_name, check=True)[source]

Step to delete instance as admin.

admin_delete_instances(instance_names, check=True)[source]

Step to delete instances as admin.

admin_filter_instances(query, check=True)[source]

Step to filter instances as admin.

admin_reset_instances_filter(check=True)[source]

Step to reset instances filter as admin.

check_admin_instances_pagination(instance_names)[source]

Step to check instances pagination as admin.

check_admin_instances_pagination_filter(instance_names)[source]

Step to check instances pagination with filtering as admin.

check_flavor_absent_in_instance_launch_form(flavor)[source]

Step to check flavor is absent in instance launch form.

check_instance_active(instance_name)[source]

Step to check instance has active status.

check_instance_pause(instance_name)[source]

Step to check that instance was paused.

check_instance_suspend(instance_name)[source]

Step to check that instance was suspended.

check_instances_pagination(instance_names)[source]

Step to check instances pagination.

check_instances_pagination_filter(instance_names)[source]

Step to check instances pagination with filtering.

check_instances_sum(instance_names, min_instances_sum=2)[source]

Step to check quantity of instances.

create_instance(instance_name=None, network_name='internal_net', count=1, check=True)[source]

Step to create instance.

create_instance_snapshot(instance_name, snapshot_name=None, check=True)[source]

Step to create instance snapshot.

delete_instance(instance_name, check=True)[source]

Step to delete instance.

delete_instances(instance_names, check=True)[source]

Step to delete instances.

filter_instances(query, check=True)[source]

Step to filter instances.

lock_instance(instance_name, check=True)[source]

Step to lock instance.

nova_associate_floating_ip(instance_name, ip, check=True)[source]

Step to associate floating IP.

nova_disassociate_floating_ip(instance_name, check=True)[source]

Step to disassociate floating IP.

rename_instance(instance_name, new_instance_name=None, check=True)[source]

Step to rename instance.

reset_instances_filter(check=True)[source]

Step to reset instances filter.

resize_instance(instance_name, flavor=None, check=True)[source]

Step to resize instance.

unlock_instance(instance_name, check=True)[source]

Step to unlock instance.

view_instance(instance_name, check=True)[source]

Step to view instance.

class stepler.horizon.steps.KeypairsSteps(app)[source]

Keypairs steps.

check_button_import_key_pair_disabled()[source]

Step to check import Key Pair disabled if quota exceeded.

check_keypairs_time()[source]

Step to check time opening Keypairs page.

create_keypair(keypair_name=None, check=True)[source]

Step to create keypair.

delete_keypair(keypair_name, check=True)[source]

Step to delete keypair.

delete_keypairs(keypair_names, check=True)[source]

Step to delete keypairs.

import_keypair(keypair_name, public_key, check=True)[source]

Step to import keypair.

class stepler.horizon.steps.NamespacesSteps(app)[source]

Namespaces steps.

create_namespace(namespace_name=None, namespace_source='Direct Input', check=True)[source]

Step to create namespace.

delete_namespace(namespace_name, check=True)[source]

Step to delete namespace.

class stepler.horizon.steps.NetworksSteps(app)[source]

networks steps.

add_subnet(network_name, subnet_name=None, network_address='10.109.3.0/24', check=True)[source]

Step to add subnet for network.

admin_delete_network(network_name, check=True)[source]

Step to delete network as admin.

admin_filter_networks(query, check=True)[source]

Step to filter networks.

admin_update_network(network_name, new_network_name=False, shared=False, check=True)[source]

Step to update network as admin.

check_network_present(network_name)[source]

Step to check network is present.

check_network_share_status(network_name, is_shared=True)[source]

Step to check network share status.

check_networks_time()[source]

Step to check time opening Networks tab.

create_network(network_name=None, shared=False, create_subnet=False, subnet_name='subnet', network_adress='192.168.0.0/24', gateway_ip='192.168.0.1', check=True)[source]

Step to create network.

delete_network(network_name, check=True)[source]

Step to delete network.

delete_networks(network_names, check=True)[source]

Step to delete networks as batch.

network_topology_page_availability(check=True)[source]

Step to go to network topology page.

user_try_to_create_shared_network(check=True)[source]

Step to check user can’t create shared network.

class stepler.horizon.steps.OverviewSteps(app)[source]

Overview steps.

check_resource_item_changed(resource_name, resource_before_creating, check=True)[source]

Step to check that quantity of resource were grown.

get_used_resource_overview(resource_name)[source]

Step to get used overview resources.

class stepler.horizon.steps.ProjectsSteps(app)[source]

Projects steps.

check_project_cant_disable_itself()[source]

Step for trying to disable current project.

create_project(project_name=None, check=True)[source]

Step to create project.

delete_project(project_name, check=True)[source]

Step to delete project.

filter_projects(query, check=True)[source]

Step to filter projects.

manage_project_members(project_name, admin_project_resources, check=True)[source]

Step to manage project members.

toggle_project(project, enable, check=True)[source]

Step to disable/enable project.

update_project_name(project_name, new_project_name, check=True)[source]

Step to update project name.

class stepler.horizon.steps.RoutersSteps(app)[source]

Routers steps.

check_routers_time()[source]

Step to check time opening Routers tab.

create_router(router_name=None, admin_state=None, external_network=None, check=True)[source]

Step to create router.

delete_router(router_name, check=True)[source]

Step to delete router.

class stepler.horizon.steps.SecurityGroupsSteps(app)[source]

Security groups steps.

add_group_rule(group_name, port_number='25', check=True)[source]

Step to add rule to the security group.

create_security_group(group_name=None, description=None, check=True)[source]

Step to create security group.

delete_group_rule(port_number, check=True)[source]

Step to remove rule from the security group.

delete_security_group(group_name, check=True)[source]

Step to delete security group.

class stepler.horizon.steps.SettingsSteps(app)[source]

Settings steps.

change_user_password(current_password, new_password, check=True)[source]

Step to change user password.

check_current_settings(expected_settings)[source]

Step to check current settings.

check_dashboard_help_url(help_url)[source]

Step to check dashboard help URL.

get_current_settings()[source]

Current user settings.

update_settings(lang=None, timezone=None, items_per_page=None, instance_log_length=None, check=True)[source]

Step to update user settings.

class stepler.horizon.steps.StacksSteps(app)[source]

Stacks steps.

change_stack_template(stack, admin_password, env_data='\nresource_registry:\n OS::Nova::Server::MyServer: myserver.yaml\n\nparameter_defaults:\n NetworkName: my_network', template_data='\nheat_template_version: 2013-05-23\n\ndescription: Just an example\n\nparameters:\n key_name:\n type: string\n default: test\n description: Name of an existing key pair to use for the instance\n flavor:\n type: string\n description: Instance type for the instance to be created\n default: m1.tiny_test\n image:\n type: string\n default: TestCirros-0.3.5\n description: ID or name of the image to use for the instance\n\nresources:\n my_instance:\n type: OS::Nova::Server\n properties:\n name: My Cirros Instance\n image: { get_param: image }\n flavor: { get_param: flavor }\n key_name: { get_param: key_name }', template_source='Direct Input', env_source='Direct Input', new_flavor='m1.tiny_test', new_image='TestCirros-0.3.5', new_keypair='test', check=True)[source]

Step to change stack template.

check_stack(stack, check=True)[source]

Step to check stack status.

create_stack(stack_name, admin_password, keypair, template_source='Direct Input', env_source='Direct Input', flavor='m1.extra_tiny_test', image='TestCirros-0.3.5', check=True)[source]

Step to create stack.

delete_stack(stack, check=True)[source]

Step to delete stack.

delete_stacks(stacks, check=True)[source]

Step to delete stacks.

preview_stack(stack_name, template_source='Direct Input', env_source='Direct Input', check=True)[source]

Step to preview stack.

resume_stack(stack, check=True)[source]

Step to resume stack.

suspend_stack(stack, check=True)[source]

Step to suspend stack.

view_stack(stack, check=True)[source]

Step to view stack.

class stepler.horizon.steps.UsersSteps(app)[source]

Users steps.

change_user_password(username, new_password, check=True)[source]

Step to change user password.

check_no_users_page_in_menu()[source]

Step to check users items is absent in menu.

check_user_cant_disable_itself()[source]

Step to try to disable current user.

check_user_enable_status(user_name, is_enabled=True)[source]

Step to check user enable status.

check_user_not_deleted(user_name)[source]

Step to check user is not deleted.

check_user_present(user_name)[source]

Step to check user is present.

create_user(username, password, project, role, check=True)[source]

Step to create user.

delete_user(username, check=True)[source]

Step to delete user.

delete_users(usernames, check=True)[source]

Step to delete users.

filter_users(query, check=True)[source]

Step to filter users.

sort_users(reverse=False, check=True)[source]

Step to sort users.

toggle_user(username, enable, check=True)[source]

Step to disable user.

update_user(username, new_username, check=True)[source]

Step to update user.

class stepler.horizon.steps.VolumeTypesSteps(app)[source]

Volume types steps.

create_qos_spec(qos_spec_name=None, consumer=None, check=True)[source]

Step to create qos spec.

create_volume_type(volume_type_name=None, description=None, check=True)[source]

Step to create volume type.

delete_qos_spec(qos_spec_name, check=True)[source]

Step to delete qos spec.

delete_volume_type(volume_type_name, check=True)[source]

Step to delete volume type.

delete_volume_types(volume_type_names, check=True)[source]

Step to delete volume types.

class stepler.horizon.steps.VolumesSteps(app)[source]

Volumes steps.

accept_transfer(transfer_id, transfer_key, volume_name, check=True)[source]

Step to accept transfer.

attach_instance(volume_name, instance_name, check=True)[source]

Step to attach instance.

change_volume_status(volume_name, status=None, check=True)[source]

Step to change volume status.

change_volume_type(volume_name, volume_type=None, check=True)[source]

Step to change volume type.

check_backup_creation_form_name_field_max_length(volume_name, expected_length)[source]

Step to check max possible length of backup name input.

Parameters:
  • volume_name (str) – name of volume to open backup creating form on it
  • expected_length (int) – expected max form field length
Raises:

AssertionError – if actual max length is not equal to expected_length

check_backups_pagination(backup_names)[source]

Step to check backups pagination.

check_default_migration_policy(volume_name)[source]

Step to check default migration policy.

Parameters:volume_name (str) – name of volume to open snapshot create form on it
Raises:AssertionError – if default migration policy not equal On Demand
check_snapshot_creation_form_name_field_max_length(volume_name, expected_length)[source]

Step to check max length of snapshot creation form name input.

Parameters:
  • volume_name (str) – name of volume to open snapshot create form on it
  • expected_length (int) – expected max form field length
Raises:

AssertionError – if actual max length is not equal to expected_length

check_snapshots_pagination(snapshot_names)[source]

Step to check snapshots pagination.

check_volume_present(volume_name, timeout=None)[source]

Check volume is present.

check_volume_present_in_admin_volume(volume_name)[source]

Step to check that volume present in table admin volumes.”” :param volume_name: name of expected volume :type volume_name: str

Raise:
AssertionError: volume_name is not present in list of names
check_volumes_pagination(volume_names)[source]

Step to check volumes pagination.

create_backup(volume_name, backup_name=None, description=None, container=None, check=True)[source]

Step to create volume backup.

create_snapshot(volume_name, snapshot_name=None, description=None, check=True)[source]

Step to create volume snapshot.

create_transfer(volume_name, transfer_name, check=True)[source]

Step to create transfer.

create_volume(volume_name=None, source_type='Image', source_name=None, volume_type=None, volume_size=None, description=None, check=True)[source]

Step to create volume.

Parameters:
  • volume_name (str) – name of volume
  • source_type (str) – type of source. Should be one of “Image” or “Volume”
  • source_name (str) – name of source (image or volume) to create volume from it
  • volume_type (str) – type of volume
  • volume_size (int) – Size of volume in GB
  • description (str) – description of volume
  • check (bool) – flag whether to check step or not
Returns:

name of created volume

Return type:

str

Raises:

AssertionError – if check failed

create_volume_from_snapshot(snapshot_name, check=True)[source]

Step to create volume from snapshot.

delete_backups(backup_names, check=True)[source]

Step to delete volume backups.

delete_snapshot(snapshot_name, check=True)[source]

Step to delete volume snapshot.

delete_snapshots(snapshot_names, check=True)[source]

Step to delete volume snapshots.

delete_volume(volume_name, check=True)[source]

Step to delete volume.

delete_volumes(volume_names, check=True)[source]

Step to delete volumes.

detach_instance(volume_name, instance_name, check=True)[source]

Step to detach instance.

edit_volume(volume_name, new_volume_name, check=True)[source]

Step to edit volume.

extend_volume(volume_name, new_size=2, check=True)[source]

Step to extend volume size.

launch_volume_as_instance(volume_name, instance_name, network_name, count=1, check=True)[source]

Step to launch volume as instance.

migrate_volume(volume_name, new_host=None, check=True)[source]

Step to migrate host.

update_snapshot(snapshot_name, new_snapshot_name, description=None, check=True)[source]

Step to update volume snapshot.

upload_volume_to_image(volume_name, image_name, check=True)[source]

Step to upload volume to image.

view_volume(volume_name, check=True)[source]

Step to view volume.

Horizon tests

Auth tests

stepler.horizon.tests.test_auth.test_login(credentials, auth_steps)[source]

Scenario: Verify that one can login and logout.

Steps:

  1. Login to horizon
  2. Switch to user project
  3. Logout

Container tests

class stepler.horizon.tests.test_containers.TestAnyOne[source]

Tests for any one.

test_available_public_container_url(create_container_ui, containers_steps_ui)[source]

Scenario: Verify that public container url is available.

Steps:

  1. Create public container using UI
  2. Create folder using UI
  3. Check folder is available by public url
  4. Delete folder

Teardown:

  1. Delete container using UI
test_create_public_container(create_container_ui)[source]

Scenario: Verify that one can create public container.

Steps:

  1. Create public container using UI

Teardown:

  1. Delete container using UI
test_upload_file_to_container(container, containers_steps_ui)[source]

Scenario: Verify that one can upload file to container.

Setup:

  1. Create container using UI

Steps:

  1. Upload file to container
  2. Delete file from container

Teardown:

  1. Delete container using UI
test_upload_file_to_folder(container, containers_steps_ui)[source]

Scenario: Verify that one can upload file to folder.

Setup:

  1. Create container using UI

Steps:

  1. Create folder using UI
  2. Upload file to folder
  3. Delete file from folder
  4. Delete folder

Teardown:

  1. Delete container using UI

Credentials tests

class stepler.horizon.tests.test_credentials.TestAdminOnly[source]

Tests for admin only.

test_download_rc_v2_non_ascii_project_name(project_name_non_ascii, api_access_steps_ui)[source]

Scenario: Verify that RCv2 is correct with non-ASCII project name.

Setup:

  1. Create project with non-ASCII name
  2. Switch to project with non-ASCII name

Steps:

  1. Download RCv2 file using UI

Teardown:

  1. Delete project with non-ASCII name
class stepler.horizon.tests.test_credentials.TestAnyOne[source]

Tests for any one.

test_download_ec2(api_access_steps_ui)[source]

Scenario: Verify that user can download EC2 credentials.

Steps:

  1. Download ec2 file using UI
test_download_rc_v2(api_access_steps_ui)[source]

Scenario: Verify that user can download RCv2.

Steps:

  1. Download RCv2 file using UI
test_download_rc_v2_via_menu(api_access_steps_ui)[source]

Scenario: Verify that user can download RCv2 via menu.

Steps:

  1. Download RCv2 file via menu using UI
test_download_rc_v3(api_access_steps_ui)[source]

Scenario: Verify that user can download RCv3.

Steps:

  1. Download RCv3 file using UI
test_download_rc_v3_via_menu(api_access_steps_ui)[source]

Scenario: Verify that user can download RCv3 via menu.

Steps:

  1. Download RCv3 file via menu using UI
test_view_credentials(api_access_steps_ui)[source]

Scenario: Verify that user can view credentials.

Steps:

  1. View credentials using UI

Quota tests

class stepler.horizon.tests.test_defaults.TestAdminOnly[source]

Tests for admin only.

test_update_defaults(update_defaults)[source]

Scenario: Verify that admin can update default quotas.

Steps:

  1. Update volumes parameter using UI

Teardown:

  1. Restore original value for volumes parameter

Flavor tests

class stepler.horizon.tests.test_flavors.TestAdminOnly[source]

Tests for admin only.

test_create_delete_flavor(flavors_steps_ui)[source]

Scenario: Verify that admin can create and delete flavor.

Steps:

  1. Create flavor using UI
  2. Delete flavor using UI
test_delete_flavors(flavors, flavors_steps_ui)[source]

Scenario: Verify that admin can delete flavors as bunch.

Setup:

  1. Create flavors using API

Steps:

  1. Delete flavors as bunch using UI
test_flavor_update_metadata(flavor, flavors_steps_ui)[source]

Scenario: Verify that admin can update flavor metadata.

Setup:

  1. Create flavor using API

Steps:

  1. Update flavor metadata using UI

Teardown:

  1. Delete flavor using API
test_modify_flavor_access(flavor, auth_steps, flavors_steps_ui, instances_steps_ui)[source]

Scenario: Verify that admin can modify flavor access.

Setup:

  1. Create flavor using API

Steps:

  1. Change flavor access using UI
  2. Logout
  3. Login with user credentials
  4. Check flavor is absent in instance launch form
  5. Logout
  6. Login with admin credentials

Teardown:

  1. Delete flavor using API
test_update_flavor(flavor, flavors_steps_ui)[source]

Scenario: Verify that admin cat update flavor.

Setup:

  1. Create flavor using API

Steps:

  1. Update flavor name using UI

Teardown:

  1. Delete flavor using API

Floating IP tests

class stepler.horizon.tests.test_floatingips.TestAnyOne[source]

Tests for anyone.

test_floating_ip_associate(horizon_server, floating_ip, floating_ips_steps_ui)[source]

Scenario: Verify that user can associate floating IP.

Setup:

  1. Create floating IP using API
  2. Create server using API

Steps:

  1. Associate floating IP to server using UI

Teardown:

  1. Delete floating IP using API
  2. Delete server using API

Host aggregate tests

class stepler.horizon.tests.test_host_aggregates.TestAdminOnly[source]

Tests for admin only.

test_create_delete_host_aggregate(host_aggregates_steps_ui)[source]

Scenario: Admin can create and delete host aggregate.

Steps:

  1. Create host aggregate using UI
  2. Delete host aggregate using UI

Image tests

class stepler.horizon.tests.test_images.TestAnyOne[source]

Tests for any one.

test_add_delete_image_metadata(horizon_image, images_steps_ui)[source]

Scenario: Check addition and deletion of image metadata.

Setup:

  1. Create image using API

Steps:

  1. Check that no metadata in Custom properties
  2. Add metadata using UI
  3. Check that metadata appeared in Custom properties and values are correct
  4. Delete metadata using UI
  5. Check that metadata disappeared in Custom properties

Teardown:

  1. Delete image using API
test_create_volume_from_image(horizon_image, images_steps_ui, volumes_steps_ui)[source]

Scenario: Verify that user can create volume from image.

Setup:

  1. Create image using API

Steps:

  1. Create volume from image using UI
  2. Check that volume is present
  3. Delete volume using UI

Teardown:

  1. Delete image using API
test_delete_images(horizon_images, images_steps_ui)[source]

Scenario: Verify that user can delete images as bunch.

Setup:

  1. Create images using API

Steps:

  1. Delete images as bunch using UI
test_edit_image(horizon_image, images_steps_ui)[source]

Scenario: Verify that user can edit image.

Setup:

  1. Create image using API

Steps:

  1. Edit image name using UI

Teardown:

  1. Delete image using API
test_edit_image_description(horizon_image, images_steps_ui)[source]

Scenario: Check addition of image description.

Setup:

  1. Create image using API

Steps:

  1. Click on image and check that description is missing
  2. Edit image by adding description using UI
  3. Click on image and check description in detailed info

Teardown:

  1. Delete image using API
test_edit_image_disk_and_ram(horizon_image, images_steps_ui)[source]

Scenario: Check edition of minimum disk and RAM.

Setup:

  1. Create image using API

Steps:

  1. Edit image and set Minimum Disk = 60Gb and Minimum RAM = 0
  2. Try to launch instance
  3. Check that all flavors with disk < 60Gb are unavailable
  4. Edit image and set Minimum Disk = 0Gb and Minimum RAM = 4096Mb
  5. Try to launch instance
  6. Check that all flavors with ram < 4096Mb are unavailable

Teardown:

  1. Delete image using API
test_images_pagination(glance_steps, horizon_images, update_settings, images_steps_ui)[source]

Scenario: Verify images pagination works right and back.

Setup:

  1. Create images using API

Steps:

  1. Update items_per_page parameter to 1 using UI
  2. Check images pagination using UI

Teardown:

  1. Delete images using API
test_launch_instance_from_image(horizon_image, images_steps_ui, instances_steps_ui)[source]

Scenario: Verify that user can launch instance from image.

Setup:

  1. Create image using API

Steps:

  1. Launch instance from image using UI
  2. Check that instance is present
  3. Delete instance using UI

Teardown:

  1. Delete image using API
test_open_image_info_in_new_tab(horizon_image, images_steps_ui)[source]

Scenario: Check opening image info in new tab works.

Setup:

  1. Create image using API

Steps:

  1. Open image info link in new tab
  2. Switch to the new tab with info
  3. Check this page exists and is available

Teardown:

  1. Delete image using API
test_public_image_visibility(images_steps_ui)[source]

Scenario: Verify that public image is visible for other users.

Steps:

  1. Check that public image is visible for different users using UI
test_remove_protected_image(horizon_image, images_steps_ui)[source]

Scenario: Verify that user can’t delete protected image.

Setup:

  1. Create image using API

Steps:

  1. Make image protected using UI
  2. Try to delete image using UI
  3. Close error notification
  4. Check that image is present
  5. Make image public using UI

Teardown:

  1. Delete image using API
test_set_image_disk_and_ram_size(images_steps_ui)[source]

Scenario: Image limits has influence on flavor choice.

Steps:

  1. Create image with min disk and min ram using UI
  2. Check that image limits has influence on flavor choice using UI

Teardown:

  1. Delete image using API
test_update_image_metadata(horizon_image, images_steps_ui)[source]

Scenario: Verify that user can update image metadata.

Setup:

  1. Create image using API

Steps:

  1. Update image metadata using UI
  2. Check metadata has been updated

Teardown:

  1. Delete image using API
test_view_image(horizon_image, images_steps_ui)[source]

Scenario: Verify that user can view image info.

Setup:

  1. Create image using API

Steps:

  1. View image using UI

Teardown:

  1. Delete image using API
class stepler.horizon.tests.test_images.TestUserOnly[source]

Tests for user only.

test_big_image_create_delete(images_steps_ui)[source]

Scenario: Check big image creation and deletion from file.

Steps:

  1. Create file 100Gb
  2. Create image from this file using UI

Teardown:

  1. Delete big file
  2. Delete image using API
test_image_privacy(glance_steps, images_steps_ui)[source]

Scenario: Non public image is not visible for other users.

Setup:

  1. Login as user to another project

Steps:

  1. Create image with public=False as admin using API
  2. Check that image is not available as public image using UI

Teardown:

  1. Delete image using API

Instance tests

class stepler.horizon.tests.test_instances.TestAdminOnly[source]

Tests for admin only.

test_admin_delete_instance(horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can delete instance as admin.

Setup:

  1. Create server using API

Steps:

  1. Delete server using UI as admin
test_admin_delete_instances(horizon_servers, instances_steps_ui)[source]

Scenario: Verify that user can delete instances as bunch as admin.

Setup:

  1. Create 3 servers using API

Steps:

  1. Delete servers as bunch using UI as admin
test_admin_filter_instances(horizon_servers, instances_steps_ui)[source]

Scenario: Verify that user can filter instances as admin.

Setup:

  1. Create two servers using API

Steps:

  1. Filter servers using UI as admin
  2. Reset filter using UI as admin

Teardown:

  1. Delete two servers using API
test_admin_instances_pagination(server_steps, horizon_servers, update_settings, instances_steps_ui)[source]

Scenario: Verify that instances pagination work for admin.

Setup:

  1. Create 3 servers using API

Steps:

  1. Check sum of instances
  2. Update items_per_page parameter to 1 using UI as admin
  3. Check instances pagination using UI as admin

Teardown:

  1. Delete 3 servers using API
test_admin_instances_pagination_filter(server_steps, horizon_servers, update_settings, instances_steps_ui)[source]

Scenario: Verify that instances pagination work with filter for admin.

Setup:

  1. Create 3 servers using API

Steps:

  1. Update items_per_page parameter to 1 using UI as admin
  2. Check instances pagination with filtering using UI as admin

Teardown:

  1. Delete 3 servers using API
test_delete_instances(horizon_servers, instances_steps_ui)[source]

Scenario: Verify that user can delete instances as bunch.

Setup:

  1. Create servers using API

Steps:

  1. Delete servers as bunch using UI
test_edit_instance_name(horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can edit instance name.

Setup:

  1. Create server using API

Steps:

  1. Rename instance

Teardown:

  1. Delete server using API
test_edit_instance_security_group(horizon_security_group, horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can edit instance security group.

Setup:

  1. Create server using API

Steps:

  1. Add security group to instance

Teardown:

  1. Delete server using API
test_launch_instances_together(instances_steps_ui, update_defaults)[source]

Scenario: Verify that user can create 20 instances together.

Steps:

  1. Set quotas to be able to run 50 servers
  2. Launch 5 servers at the same time
  3. Delete 5 servers as bunch

Teardown:

  1. Restore original value for instances parameter
test_nova_associate_ip(horizon_server, floating_ip, instances_steps_ui)[source]

Scenario: Verify associate/disassociate ip to instance.

Setup:

  1. Create server using API
  2. Create floating IP using API

Steps:

  1. Associate floating ip to instance
  2. Disassociate floating ip from instance

Teardown:

  1. Delete server using API
  2. Delete floating IP using API
test_pause_instance(instances_steps_ui, server)[source]

Scenario: Verify that instance was paused.

Setup:

  1. Create server using API

Steps:

  1. Check instance pause
test_suspend_instance(instances_steps_ui, server)[source]

Scenario: Verify that instance was suspended.

Setup:

  1. Create server using API

Steps:

  1. Check instance suspend
class stepler.horizon.tests.test_instances.TestAnyOne[source]

Tests for anyone.

test_create_instance(instances_steps_ui)[source]

Scenario: Verify that user can create and delete instance.

Steps:

  1. Create server using UI
  2. Delete server using UI
test_create_instance_snapshot(horizon_server, instances_steps_ui, images_steps_ui)[source]

Scenario: Verify that user can create instance snapshot.

Setup:

  1. Create server using API

Steps:

  1. Create snapshot
  2. Check that snapshot created
  3. Delete snapshot

Teardown:

  1. Delete server using API
test_filter_instances(horizon_servers, instances_steps_ui)[source]

Scenario: Verify that user can filter instances.

Setup:

  1. Create servers using API

Steps:

  1. Filter servers using UI
  2. Reset filter using UI

Teardown:

  1. Delete servers using API
test_instances_pagination(server_steps, horizon_servers, update_settings, instances_steps_ui)[source]

Scenario: Verify that instances pagination works.

Setup:

  1. Create 3 servers using API

Steps:

  1. Check sum of instances
  2. Update items_per_page parameter to 1 using UI
  3. Check instances pagination using UI

Teardown:

  1. Delete 3 servers using API
test_instances_pagination_filter(server_steps, horizon_servers, update_settings, instances_steps_ui)[source]

Scenario: Verify that instances pagination work with filter.

Setup:

  1. Create 3 servers using API

Steps:

  1. Update items_per_page parameter to 1 using UI
  2. Check instances pagination with filtering using UI

Teardown:

  1. Delete 3 servers using API
test_lock_instance(horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can lock instance.

Setup:

  1. Create server using API

Steps:

  1. Lock server using UI
  2. Unlock server using UI

Teardown:

  1. Delete server using API
test_resize_instance(horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can resize instance.

Setup:

  1. Create server using API

Steps:

  1. Resize instance

Teardown:

  1. Delete server using API
test_view_instance(horizon_server, instances_steps_ui)[source]

Scenario: Verify that user can view instance details.

Setup:

  1. Create server using API

Steps:

  1. View server using UI

Teardown:

  1. Delete server using API
class stepler.horizon.tests.test_instances.TestUserOnly[source]

Tests for user only.

test_delete_instances(horizon_servers_with_private_image, instances_steps_ui)[source]

Scenario: Verify that user can delete instances as bunch.

Setup:

  1. Create servers using API

Steps:

  1. Delete servers as bunch using UI
test_edit_instance_name(horizon_server_with_private_image, instances_steps_ui)[source]

Scenario: Verify that user can edit instance name.

Setup:

  1. Create server using API

Steps:

  1. Rename instance

Teardown:

  1. Delete server using API
test_edit_instance_security_group(horizon_security_group, horizon_server_with_private_image, instances_steps_ui)[source]

Scenario: Verify that user can edit instance security group.

Setup:

  1. Create server using API

Steps:

  1. Add security group to instance

Teardown:

  1. Delete server using API
test_nova_associate_ip(horizon_server_with_private_image, floating_ip, instances_steps_ui)[source]

Scenario: Verify associate/disassociate ip to instance.

Setup:

  1. Create server using API
  2. Create floating IP using API

Steps:

  1. Associate floating ip to instance
  2. Disassociate floating ip from instance

Teardown:

  1. Delete server using API
  2. Delete floating IP using API

Keypair tests

class stepler.horizon.tests.test_keypairs.TestAdminOnly[source]

Tests for admin only.

test_import_key_pair_quota_exceeded(keypair, update_defaults, keypairs_steps_ui)[source]

Scenario: Verify button import Key Pair is disabled if quota exceeded.

Setup:

  1. Create key pair using API

Steps:

  1. Set key pairs quota to 1
  2. Check that button import Key Pair is disabled

Teardown:

  1. Delete key pair using API
class stepler.horizon.tests.test_keypairs.TestAnyOne[source]

Tests for any user.

test_create_keypair(keypairs_steps_ui)[source]

Scenario: Verify that user can create keypair.

Steps:

  1. Create keypair using UI
  2. Delete keypair using UI
test_import_keypair(keypairs_steps_ui)[source]

Scenario: Verify that user can import keypair.

Steps:

  1. Import keypair using UI

Teardown:

  1. Delete keypair using API

Metadata definitions tests

class stepler.horizon.tests.test_metadata_definitions.TestAdminOnly[source]

Tests for admin only.

test_create_namespace(namespaces_steps_ui)[source]

Scenario: Verify that user can create namespace.

Steps:

  1. Create namespace using UI
  2. Delete namespace using UI

Network tests

class stepler.horizon.tests.test_networks.TestAdminOnly[source]

Tests for admin only.

test_create_shared_network(networks_steps_ui)[source]

Scenario: Verify that admin can create shared network.

Steps:

  1. Create shared network using UI
  2. Delete network using UI
class stepler.horizon.tests.test_networks.TestAnyOne[source]

Tests for any user.

test_network_topology_page_exists(networks_steps_ui)[source]

Scenario: Verify that page Network Topology exists.

Steps:

  1. Open Network Topology page
test_subnet_add(network, networks_steps_ui)[source]

Scenario: Verify that user can add subnet.

Setup:

  1. Create network using API

Steps:

  1. Add subnet to network using UI

Teardown:

  1. Delete subnet using API
  2. Delete network using API
class stepler.horizon.tests.test_networks.TestUserOnly[source]

Tests for demo only.

test_not_create_shared_network(networks_steps_ui)[source]

Scenario: Verify that user can not create shared network.

Steps:

  1. Check that user can’t make network shared

Project tests

class stepler.horizon.tests.test_projects.TestAdminOnly[source]

Tests for admin only.

test_create_project(projects_steps_ui)[source]

Scenario: Verify that admin can create project.

Steps:

  1. Create project using UI
  2. Delete project using UI
test_disable_enable_project(project, projects_steps_ui)[source]

Scenario: Disable and enable created project.

Setup:

  1. Create project with API

Steps:

  1. Disable created project with UI
  2. Enable it using UI

Teardown:

  1. Delete project via API
test_manage_project_members(project, admin_project_resources, projects_steps_ui)[source]

Scenario: Check we can manage project members.

Setup:

  1. Create project with API

Steps:

  1. Manage project members using UI

Teardown:

  1. Delete project with UI
test_switch_projects(admin_project_resources, project, projects_steps_ui, overview_steps_ui, security_groups_steps_ui)[source]

Scenario: Check resources in different projects.

Setup:

  1. Create project with API

Steps:

  1. Check overview of base project before creating resource
  2. Create security group for base project using UI
  3. Check that quantity of resource for base project has been grown
  4. Manage project members using UI
  5. Switch on created project
  6. Check overview before creating resource
  7. Create security group using UI
  8. Check that quantity of resource has been grown

Teardown:

  1. Delete project via API
test_try_to_disable_current_project(projects_steps_ui)[source]

Scenario: Verify that project can’t disable itself.

Steps:

  1. Try to disable current project
test_update_project_name(project, projects_steps_ui)[source]

Scenario: Check that project can be deleted after update name.

Setup:

  1. Create project with API

Steps:

  1. Update project name

Teardown:

  1. Delete project via API

Router tests

class stepler.horizon.tests.test_router.TestAnyOne[source]

Tests for any user.

test_create_delete_router(routers_steps_ui)[source]

Scenario: Verify that user can create and delete router.

Steps:

  1. Create router using UI
  2. Delete router using UI

Security group tests

class stepler.horizon.tests.test_security_groups.TestAnyOne[source]

Tests for any user.

test_add_delete_rule(security_groups_steps_ui, security_group)[source]

Scenario: Verify that user can manage rules for security group.

Setup:

  1. Create security group using API

Steps:

  1. Add rule using UI
  2. Delete rule using UI

Teardown:

  1. Remove security group using API
test_create_delete_security_group(security_groups_steps_ui)[source]

Scenario: Verify that user can create and delete security group.

Steps:

  1. Create security group using UI
  2. Delete security group using UI

User settings tests

class stepler.horizon.tests.test_user_settings.TestAdminOnly[source]

Tests for admin only.

test_change_own_password(new_user_login, auth_steps, settings_steps_ui)[source]

Scenario: Verify that user can change it’s password.

Setup:

  1. Create user using API
  2. Login as new user

Steps:

  1. Change user password using UI
  2. Try to login using old password
  3. Check that alert is present
  4. Login using new password

Teardown:

  1. Delete user using API
test_change_own_settings(new_user_login, update_settings, settings_steps_ui)[source]

Scenario: Verify that user can change his settings.

Setup:

  1. Create user using API
  2. Login as new user

Steps:

  1. Update user settings using UI
  2. Refresh page
  3. Check that settings have been updated using UI

Teardown:

  1. Restore initial values for settings
  2. Delete user using API
test_dashboard_help_url(new_user_login, settings_steps_ui)[source]

Scenario: Verify that user can open dashboard help url.

Setup:

  1. Create user using API
  2. Login as new user

Steps:

  1. Check dashboard help url using UI

Teardown:

  1. Delete user using API

Users tests

class stepler.horizon.tests.test_users.TestAdminOnly[source]

Tests for admin only.

test_change_user_password(new_user_with_project, users_steps_ui, auth_steps)[source]

Scenario: Verify that admin can change user password.

Setup:

  1. Create user using API

Steps:

  1. Change user password using UI
  2. Logout
  3. Login with user credentials
  4. Logout
  5. Login with admin credentials

Teardown:

  1. Delete user using API
test_create_user(users_steps_ui)[source]

Scenario: Verify that admin can create and delete user.

Steps:

  1. Create user using UI
  2. Delete user using UI
test_delete_users(users, users_steps_ui)[source]

Scenario: Verify that admin can delete users as bunch.

Setup:

  1. Create users using API

Steps:

  1. Delete users as bunch using UI
test_disable_enable_user(user, users_steps_ui)[source]

Scenario: Verify that admin can enable and disable user.

Setup:

  1. Create user using API

Steps:

  1. Disable user using UI
  2. Enable user using UI

Teardown:

  1. Delete user using API
test_filter_users(users_steps_ui)[source]

Scenario: Verify that admin can filter users.

Steps:

  1. Filter users using UI
test_impossible_delete_admin_via_button(users_steps_ui)[source]

Scenario: Verify that admin can’t delete himself.

Steps:

  1. Try to delete admin user using UI
  2. Close error notification
  3. Check that admin user is present
test_impossible_delete_admin_via_dropdown(users_steps_ui)[source]

Scenario: Admin can’t be deleted with dropdown menu.

Steps:

  1. Try to delete admin user from dropdown menu using UI
test_impossible_disable_admin(users_steps_ui)[source]

Scenario: Verify that admin can’t disable himself.

Steps:

  1. Try to disable admin user using UI
  2. Check that user is enabled
test_sort_users(users_steps_ui)[source]

Scenario: Verify that admin can sort users.

Steps:

  1. Sort users using UI
  2. Refresh page
  3. Sort users in reversed order using UI
test_try_to_disable_current_user(users_steps_ui)[source]

Scenario: Verify that user can’t disable himself.

Steps:

  1. Try to disable current user
test_update_user(user, users_steps_ui)[source]

Scenario: Verify that admin can update user.

Setup:

  1. Create user using API

Steps:

  1. Update user name using UI

Teardown:

  1. Delete user using API
class stepler.horizon.tests.test_users.TestUserOnly[source]

Tests for demo user only.

test_unavailable_users_list_for_unprivileged_user(users_steps_ui)[source]

Scenario: Verify that demo user can’t see users list.

Steps:

  1. Check that users page is absent for demo user

Volume backup tests

class stepler.horizon.tests.test_volume_backups.TestAnyOne[source]

Tests for any user.

test_create_volume_backup(volume, volumes_steps_ui)[source]

Scenario: Create volume backup.

Setup:

  1. Create volume using API

Steps:

  1. Create backup using UI

Teardown:

  1. Delete backup using API
  2. Delete volume using API
test_create_volume_backup_with_description(volume, volumes_steps_ui)[source]

Scenario: Create volume backup with description.

Setup:

  1. Create volume using API

Steps:

  1. Create backup with description

Teardown:

  1. Delete backup using API
  2. Delete volume using API
test_create_volume_backup_with_max_length_description(volume, volumes_steps_ui)[source]

Scenario: Create volume backup with description length == max.

Setup:

  1. Create volume using API

Steps:

  1. Create backup with long (255 symbols) description using UI

Teardown:

  1. Delete backup using API
  2. Delete volume using API
test_delete_volume_backups(volume_backups, volumes_steps_ui)[source]

Scenario: Delete volume backups as bunch.

Setup:

  1. Create volume using API
  2. Create backups using API

Steps:

  1. Delete backups as bunch using UI

Teardown:

  1. Delete volume using API
test_volume_backup_form_max_name_length(volume, volumes_steps_ui)[source]

Scenario: Create volume backup with name length > 255.

Setup:

  1. Create volume using API

Steps:

  1. Open backup creation form using UI
  2. Check that backup name input can’t contains more than 255 symbols

Teardown:

  1. Delete volume using API
test_volume_backups_pagination(backup_steps, volume_backups, update_settings, volumes_steps_ui)[source]

Scenario: Verify that volume backups pagination works.

Setup:

  1. Create volume using API
  2. Create some backups using API

Steps:

  1. Update items_per_page parameter to 1 using UI
  2. Check backups pagination using UI

Teardown:

  1. Delete backups using API
  2. Delete volumes using API

Volume snapshot tests

class stepler.horizon.tests.test_volume_snapshots.TestAnyOne[source]

Tests for any user.

test_create_volume_from_snapshot(volume_snapshot, volumes_steps_ui)[source]

Scenario:** Verify that user can create volume from snapshot.

Setup:

  1. Create volume using API
  2. Create snapshot using API

Steps:

  1. Create volume from snapshot using UI
  2. Delete created volume using UI

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_create_volume_snapshot(volume, volumes_steps_ui)[source]

Scenario: Create volume snapshot.

Setup:

  1. Create volume using API

Steps:

  1. Create snapshot using UI

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_create_volume_snapshot_with_description(volume, volumes_steps_ui)[source]

Scenario: Create volume snapshot with description.

Setup:

  1. Create volume using API

Steps:

  1. Create volume snapshot with description using UI

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_create_volume_snapshot_with_long_name(volume, volumes_steps_ui)[source]

Scenario: Create volume snapshot with name length > 255.

Setup:

  1. Create volume using API

Steps:

  1. Check that snapshot’s name on snapshot’s creation form can
    contain max 255 symbols

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_create_volume_snapshot_with_max_length_description(volume, volumes_steps_ui)[source]

Scenario: Create volume snapshot with description length == max.

Setup:

  1. Create volume using API

Steps:

  1. Create snapshot with long (255 symbols) description using UI

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_delete_volume_snapshot(volume_snapshot, volumes_steps_ui)[source]

Scenario: Create volume snapshot.

Setup:

  1. Create volume using API
  2. Create snapshot using API

Steps:

  1. Delete snapshot using UI

Teardown:

  1. Delete volume using API
test_edit_volume_snapshot(volume_snapshot, volumes_steps_ui)[source]

Scenario:** Verify that user can edit volume snapshot.

Setup:

  1. Create volume using API
  2. Create snapshot using API

Steps:

  1. Edit snapshot name using UI

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_volume_snapshots_pagination(snapshot_steps, volume_snapshots, update_settings, volumes_steps_ui)[source]

Scenario:** Verify that snapshots pagination works right and back.

Setup:

  1. Create volume using API
  2. Create some snapshots using API

Steps:

  1. Update items_per_page parameter to 1 using UI
  2. Check snapshots pagination using UI

Teardown:

  1. Delete snapshots using API
  2. Delete volume using API

Volume type tests

class stepler.horizon.tests.test_volume_types.TestAdminOnly[source]

Volume type tests are available for admin only.

test_qos_spec_create(volume_types_steps_ui)[source]

Verify that QoS Spec can be created and deleted.

Steps:

  1. Create QoS Spec using UI
  2. Delete QoS Spec using UI
test_volume_type_create(volume_types_steps_ui)[source]

Verify that volume type can be created and deleted.

Steps:

  1. Create volume type using UI
  2. Delete volume type using UI

Volume tests

class stepler.horizon.tests.test_volumes.TestAdminOnly[source]

Tests for admin only.

test_change_volume_status(volume, volumes_steps_ui)[source]

Scenario: Verify that admin can change volume status.

Setup:

  1. Create volume using API

Steps:

  1. Change volume status to Error using UI
  2. Change volume status to Available using UI

Teardown:

  1. Delete volume using API
test_change_volume_type(volume_type, volume, volumes_steps_ui)[source]

Scenario: Verify that user can change volume type.

Setup:

  1. Create volume using API
  2. Create volume type using API

Steps:

  1. Change volume type using UI

Teardown:

  1. Delete volume using API
  2. Delete volume type using API
test_container_name_volume_backup(volume, containers_steps_ui, volumes_steps_ui)[source]

Scenario: Verify that container has name ‘volumebackups’.

Setup:

  1. Create volume using API

Steps:

  1. Create volume backup without container name
  2. Check that container has name ‘volumebackups’

Teardown:

  1. Delete volume using API
test_launch_volume_as_instance(bootable_volume, instances_steps_ui, volumes_steps_ui)[source]

Scenario: Verify that admin can launch volume as instance.

Setup:

  1. Create bootable volume using API

Steps:

  1. Launch volume as instance using UI
  2. Change that instance status is Active using UI
  3. Delete instance using UI

Teardown:

  1. Delete volume using API
test_manage_volume_attachments(volume, server, volumes_steps_ui)[source]

Scenario: Verify that admin can manage volume attachments.

Setup:

  1. Create volume using API
  2. Create server using API

Steps:

  1. Attach server to volume using UI
  2. Detach server from volume using UI

Teardown:

  1. Delete server using API
  2. Delete volume using API
test_migrate_volume(volume, volumes_steps_ui)[source]

Scenario: Verify that admin can migrate volume.

Setup:

  1. Create volume using API

Steps:

  1. Migrate volume to new host using UI
  2. Migrate volume to old host using UI

Teardown:

  1. Delete volume using API
test_transfer_volume(volume, auth_steps, volumes_steps_ui)[source]

Scenario: Verify that volume can be transferred between users.

Setup:

  1. Create volume using API

Steps:

  1. Create volume transfer as admin user using UI
  2. Logout
  3. Login as user user
  4. Accept volume transfer using UI

Teardown:

  1. Delete volume using API
test_volume_present_in_admin_volumes(volumes_steps_ui, volume)[source]

Scenario: Verify that volume present in admin volumes.

Setup:
  1. Create volume using API

Steps:

  1. Check that volume present in admin volumes

Teardown:

  1. Delete volume using API
class stepler.horizon.tests.test_volumes.TestAnyOne[source]

Tests for any user.

test_create_bigger_volume_from_volume(volume, volumes_steps_ui)[source]

Scenario: Create bigger volume from another volume.

Setup:

  1. Create volume using API

Steps:

  1. Create volume from created volume with bigger size using UI
  2. Check that volume is created

Teardown:

  1. Delete volumes
test_create_volume_with_description(volumes_steps_ui)[source]

Scenario: Create volume with description.

Steps:

  1. Create volume with description using UI
  2. Check that volume created
  3. Check that description is correct

Teardown:

  1. Delete volume using API
test_create_volume_with_escaped_symbols(volumes_steps_ui)[source]

Scenario: Create volume and snapshot with escaped symbols.

Steps:

  1. Create volume with specific name using UI
  2. Create volume snapshot with the same name as volume

Teardown:

  1. Delete snapshot using API
  2. Delete volume using API
test_default_migration_policy(volume, volumes_steps_ui)[source]

Verify that Migration Policy is On Demand by default.

Setup:

  1. Create volume using API

Steps:

  1. Check that Migration policy is On Demand by default when user changes volume type

Teardown:

  1. Delete volume using API
test_delete_volumes(volumes, volumes_steps_ui)[source]

Scenario: Verify that user can delete volumes as bunch.

Setup:

  1. Create volumes using API

Steps:

  1. Delete volume as bunch using UI
test_edit_volume(volume, volumes_steps_ui)[source]

Scenario: Verify that user can edit volume.

Setup:

  1. Create volume using API

Steps:

  1. Edit volume name using UI

Teardown:

  1. Delete volume using API
test_upload_volume_to_image(volume, images_steps_ui, volumes_steps_ui)[source]

Scenario: Verify that user can upload volume to image.

Setup:

  1. Create volume using API

Steps:

  1. Upload volume to image using UI
  2. Check image presence
  3. Delete image using UI

Teardown:

  1. Delete volume using API
test_view_volume(volume, volumes_steps_ui)[source]

Scenario: Verify that user can view volume info.

Setup:

  1. Create volume using API

Steps:

  1. View volume using UI

Teardown:

  1. Delete volume using API
test_volume_extend(volume, volumes_steps_ui)[source]

Scenario: Verify that user can extend volume size.

Setup:

  1. Create volume using API

Steps:

  1. Extend volume using UI

Teardown:

  1. Delete volume using API
test_volumes_pagination(volume_steps, volumes, volumes_steps_ui, update_settings)[source]

Scenario: Verify that volumes pagination works right and back.

Setup:

  1. Create some volumes using API

Steps:

  1. Update items_per_page parameter to 1 using UI
  2. Check volumes pagination using UI

Teardown:

  1. Delete volumes using API
class stepler.horizon.tests.test_volumes.TestUserOnly[source]

Tests for user only.

test_launch_volume_as_instance(instances_steps_ui, bootable_volume_with_private_image, volumes_steps_ui)[source]

Scenario: Verify that admin can launch volume as instance.

Setup:

  1. Create bootable volume using API

Steps:

  1. Launch volume as instance using UI
  2. Change that instance status is Active using UI
  3. Delete instance using UI

Teardown:

  1. Delete volume using API