Commit Graph

202 Commits

Author SHA1 Message Date
Jan Jasek 2964a50fd4 Stability improvement of Instance tests
Change-Id: Ia3a0d433002a1703c400c33b5901c3bca08d91bd
2023-04-25 12:58:23 +00:00
Ashish Gupta ed947b453f Unskipping test_floatingip_associate_disassociate test case
Change-Id: I31d73269364fc3a4fa26bf8759852f84ca9b25e0
2023-04-04 02:50:33 +05:30
Jan Jasek c88583e33a Change of the procedure how the popup messages are checked
Check and close all the popup messages in one step
and return all the levels of present messages.
There is no longer necessary to use a separate step for checking
presence/absence of Success message, Error message, etc.

Change-Id: I15a0dbe99282f00c5970d9d7d5c9b480989e9e14
2023-03-17 13:09:10 +01:00
Jan Jasek b14958df8b Fix instance error with attribute cells.
Selenium read data faster than the data are loaded.
Added wait until element is visible.

Change-Id: I2975ea5836a898d113a2baaab6a8f9bf8af8d742
2022-11-03 11:29:12 +01:00
Jan Jasek 01c4ab920d Fix delete image tests.
Add wait until checkbox is in active state.

Fix edit_image_description_and_name test.
Add wait until the name text box is filled by default name (is not empty).
In the other case selenium write new name into text box faster than default
name is written there so default name then rewrite the new name.

Change-Id: I56803e19dd80180cc432ca872a28a7ee7f41290d
2022-10-17 17:13:04 +02:00
Tatiana Ovchinnikova 4743c6c748 Integration test navigation machinery for Angular pages
There's an implementation of navigation modules for pages written
in Angular.
Legacy tests for images page are rewritten to work with the new
navigation.

Change-Id: Ib8a40f0adb0a46c9d646c6796a4242988eefa6e3
2022-09-26 14:19:50 -05:00
Rodrigo Barbieri 196de449b6 Implement pagination in admin/proj network tab
Added pagination support to the networks page under
Project and Admin Dashboard.

To accomplish so, the method network_list_for_tenant
in api/neutron.py that is used for listing networks under
the Project Dashboard was refactored to merge the different
requests for shared, non-shared and external networks while
tracking the pagination for each of those requests, so for
instance when all the shared networks are listed and paginated
then the non-shared networks are queried and so on.

For the Admin dashboard all network types are retrieved under
a single request so it is a simpler pagination logic.

Partial-Bug: #1746184
Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025
2022-02-16 18:15:48 -03:00
Radomir Dopieralski e53c4d8ca0 Fix the instances pagination integration tests
Looks like the popup that comes up after creating instances is no
longer a SUCCESS, but instead it's INFO.

This patch fixes integration tests which were using the incorrect
message class and revisits all other tests skipped with the same
bug number reason.

Change-Id: I0e2976b56513df3cb45ea00e0f9f05603a8743a8
Closes-bug: #1774697
2021-07-28 21:00:05 +00:00
Pedro Kostelec ae7896cea5 Consisent abbreviation of size units
Most units (KB, MB, GB, TB, PB) are shown in an abbreviated format.
The exception were bytes, which where shown as "Bytes". This commit
resolves this inconsistency by showing "B" for byte units.

Change-Id: Ied94c777a70bf8955f5a328ffcb63d98a7a2befd
Closes-Bug: 1411595
Signed-off-by: Iago Estrela <hiagoestrelas@gmail.com>
2021-05-04 11:50:17 -03:00
Radomir Dopieralski 3d82d57353 Save instace_id inside Associate Floating IP workflow
Also, rename instance_id field to proper port_id.

Before this change, when instance_id was passed from the Instances
page in the URL, the information would be lost on form submission,
and if the form contained an error, the it would be redisplayed with
the port drop-down containing all ports from all instances. This also
made submitting this form slow, as the drop-down would be populated
with all ports on form validation.

It also creates a bug, where if there are more instances than Nova's
pagination allows, the ports from newer instances would no longer
appear in the drop-down, and the form would fail to validate, even
though the choice of port on initial form was correct.

Closes-bug: #1920010
Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
2021-03-18 12:39:23 +01:00
Zuul 502ac4bfaa Merge "[Cleanup] Remove unused attributes" 2020-12-03 18:19:20 +00:00
Zuul cc127d9a10 Merge "Add integration-test for Volume Group Type" 2020-12-01 20:06:32 +00:00
manchandavishal ee667919c3 [Cleanup] Remove unused attributes
Consistency Groups and Consistency Group Snapshots support
already dropped in the horizon during train release. So this patch
removes these parameters from integration_tests/pages/navigation.py
file.

Change-Id: Ia80271f70a2f7a3228d26d5892ea14971bb4d1f2
2020-12-01 07:27:46 +00:00
manchandavishal 85d75107cf Add integration-test for Volume Group Type
This patch adds integration-tests for volume group-type.

Change-Id: I032bfb10ce6cccfed63b963437392576c9fbb488
Closes-Bug: #1892679
2020-11-26 11:05:31 +00:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Pallav Gupta ad41fe5106 Fix instances integration tests
The aim of this PS is to fix existing skipped instances
integration tests listed below:
- TestAdminInstances.test_create_delete_instance
- TestInstances.test_create_delete_instance

This PS also resolves Partial-Bug: #1774697

Change-Id: I9c2385274a2725409f61137ae201d868d24a56b4
2020-05-20 00:20:54 -05:00
Ivan Kolodyazhny d870b40583 Remove six usage from openstack_dashboard package
We don't support Python 2 anymore so we don't need this
compatibility library.

six.reraise usages are left as is until it'll be moved to some
base lib like oslo.utils to not re-implenent this method in
Horizon.

This patch also removes Python2-specific base test case methods
assertItemsEqual and assertNotRegexpMatches in flavor of new
Python 3 analogues.

Change-Id: I26a59176be9e9f213128e4945a58b9459334b626
2020-01-15 12:47:48 +02:00
Zuul 99ade30436 Merge "Fix volumes and volume_snapshots integration tests" 2019-12-02 20:13:30 +00:00
Pallav Gupta 6190c50184 Fix users integration test
The aim of this PS is to fix existing skipped
test_users integration test.

This PS also resolves Partial-Bug: #1774697

Change-Id: I8da7c09d712a12369d2ab757e22f44e1bb5f0960
2019-10-15 01:12:59 -05:00
Pallav Gupta 7b7cabd071 Fix volumes and volume_snapshots integration tests
The aim of this PS is to fix existing skipped integration
tests related to volumes and volume_snapshots listed below:
  - TestAdminVolumes.test_volume_create_edit_delete
  - TestVolumesActions.test_volume_extend
  - TestVolumesBasic.test_volume_create_edit_delete
  - TestAdminVolumes.test_volumes_pagination
  - TestVolumesBasic.test_volumes_pagination
  - TestVolumeSnapshotsAdmin.test_create_edit_delete_volume_snapshot
  - TestVolumeSnapshotsBasic.test_create_edit_delete_volume_snapshot
  - TestVolumeSnapshotsAdmin.test_volume_snapshots_pagination
  - TestVolumeSnapshotsAdvanced.test_create_volume_from_snapshot
  - TestVolumeSnapshotsBasic.test_volume_snapshots_pagination

This PS also resolves Partial-Bug: #1792028

Change-Id: I31a8d681f87d22ce8486de38ba6c01be9c9cc469
2019-10-12 13:42:51 -05:00
Pallav Gupta 558f6701ab Fix router integration tests
The aim of this PS is to fix skipped router integration tests
listed below:
  - test_router_add_delete_interface (Partial-Bug: #1792028)
  - test_router_delete_interface_by_row (Partial-Bug: #1792028)
  - test_router_overview_data (Partial-Bug: #1792028)
  - test_router_create_admin (Partial-Bug: #1792028)

Change-Id: I82b15d347831762808b17fbda8c944a1ee5de564
2019-10-04 06:00:57 +00:00
Pallav Gupta a945d41812 Fix skipped integration tests for securitygroup, namespace, usersettings
The aim of this PS is to fix existing skipped integration
tests listed below:
 - test_namespace_create_delete (Partial-Bug: #1774697)
 - test_securitygroup_create_delete (Partial-Bug: #1792028)
 - test_managerules_create_delete_by_table (Partial-Bug: #1792028)
 - test_managerules_create_delete_by_row (Partial-Bug: #1792028)
 - test_password_change (Related-Bug: #1776678)
 - test_show_message_after_logout (Related-Bug: #1776678)

Change-Id: Ifcbab546e81059f90b500337df565c20ac50bbbb
2019-09-26 13:03:06 +05:30
Ivan Kolodyazhny 43f8c3b1f5 Switch integration tests to run with python3
tox env for the integration tests is now renamed to 'integration'
as it is no longer run under python 2.7.

__hash__() method is now defined in integration_tests.helpers.BaseTestCase
to avoid unhashable error during loading django test runner. This is
originally caused by the fact that the base testcase class for integration
tests is implemented on top of testtools and testtools does not define
__hash__() method. In Python 3, __hash__() method must be defined
if a class (re)defines __eq__() method to make the class hashable [1].
Ideally integration base TestCase class can be implemented on top of
Django test case, but the current implementation depends on features
from testtools a lot, so it seems better to add __hash__() method
as a workaround.

Unbound methods don't exist in Python 3[2], so six.create_unbound_method
doesn' work as expected. To dynamic method generation we have to use new
descriptors interface [3] or just generate new
functools.partialmethod [4] function introduced in Python 3.4 to
generate class methods with pre-defined 'path' argument and pass 'self'
as a first function argument for class instance.

[1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__
[2] https://six.readthedocs.io/#six.create_unbound_method
[3] https://docs.python.org/3/howto/descriptor.html
[4] https://docs.python.org/3/library/functools.html#functools.partialmethod

Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
2019-03-05 09:10:01 +00:00
Akihiro Motoki b06657b07d Fix gate failures by a new pycodestyle
pycodestyle 2.5.0 introduces E117 over-indented.
This commit fixes E117 errors.

pycodestyle 2.5.0 also drops pep8.py. As a result,
horizon/test/unit/hacking/test_checks.py starts to fail.
The equivalent elements are provided by pycodestyle.py,
so we can consume pycodestyle instead of pep8 module.

Change-Id: Ib103998f42ce7c901a10669b771a898783ca1a92
2019-01-30 17:02:20 +09:00
Zuul b30331224f Merge "Bump hacking to 1.1.0" 2018-11-14 09:19:47 +00:00
nicolas fe69104738 Add domain support for specialized test login
Some test servers require the domain parameter for login.
This small change provides support for servers that require
this additional login step.

Change-Id: Ia9f94b687ee6d3318fa61ad3f446b21ed6cfea6a
Closes-Bug: #1802343
2018-11-12 21:06:37 +00:00
Akihiro Motoki cebe212d00 Bump hacking to 1.1.0
Fix the following new errors:
* E305 expected 2 blank lines after class or function definition, found 1
* E126 continuation line over-indented for hanging indent

max_line_length is set to 80 as the default value in pycodestyle is 79
but horizon uses 80 as max_line_length.

Ignore W504 and F405 by configurations.
Reasons of disabling them are explained as comments in tox.ini.

Change-Id: Iee8bcd60c30883fc8c74f08cf20af853cbb5e271
2018-11-10 16:44:25 +09:00
wondernath 47d14a46f5 integration test fixes
* updated admin user case navigation to admin - overview page on login
* updated test_update_compute_defaults making it specific to compute
* defined test_update_volume_defaults & updated defaults page module
* removed skip decorator for test_create_delete_project as bug 1777359
  is resolved
* cleaned up test_flavors and updated flavors page module

Change-Id: If529bfd7bc7fd0e29b42b12e601824ec6d684fca
2018-07-02 17:16:45 +00:00
panneer.smn 15574cad5c Integration test fixes
* fixed 37 tests in total
* restructured and renamed test modules as per horizon
* fixed page navigation & updated method calls
* fixed css selector and xpaths as per horizon
* Removed decorators.skip for working tests
* included decorators.skip for non - working tests
* updated description for tests as per horizon navigation
* removed *update flavor info* and *update flavor access* test, as feature unavailable on horizon
* updated table column name references in page modules
* updated bind table action names as per horizon
* included help page navigation checkpoint
* fixed rc file download drop down selection
* updated page titles in test modules
* included calls as required for spinner disappearance
* updated form fields as per test needs
* updated default ipv4 and subnet for router interfaces
* included string conversion as required for comparisons
* updated cirros image name in horizon.conf

Change-Id: I9fdc810b37443b616bbb82956d1c90a0fa5ebd6b
2018-06-21 10:59:31 +03:00
Zuul 3e0da5b91c Merge "Fix W503 warnings" 2018-04-24 09:48:08 +00:00
Guillaume Le Blanc e362626031 Allow OVA upload for images
Bug #1641383 was not fixed for REST API call.
The two implementation of create_image_metadata are merged
into api/glance.py.

There were minor differences in field naming and handling
(min_ vs minimum_, is_public vs public vs visibility).
This commit normalizes them to simplify the logic.

Closes-Bug: #1757136
Change-Id: I41e9d94345151bc4473d704cdc040ed77870ce45
2018-04-16 16:49:35 +02:00
Akihiro Motoki 11eb4e9d3e Fix W503 warnings
W503 line break before binary operator

Looking at the code base, it sounds okay to follow this check.

Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
2018-04-11 18:13:47 +09:00
Akihiro Motoki eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Akihiro Motoki af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
yanghuichan 7adb3f548b Replace dict.iteritems() with dict.items() in horizon
1.As mentioned in [1], we should avoid using dict.iteritems()
to achieve iterators. We can use dict.items instead, as it will
return iterators in PY3 as well. And dict.items/keys will more
readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.htmls

Change-Id: Idba02079d76b529b344ae96cebb7d6161c0ecbc6
2017-08-01 08:31:49 +08:00
Akihiro Motoki e6b78f92f2 Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
2017-07-03 08:02:23 +00:00
Akihiro Motoki b9d0243c33 Fix H405 (multi line docstring) warnings (openstack_dashboard)
H405: multi line docstring summary not separated with an empty line

Closes-Bug: #1696996

Change-Id: Id895695663b19522d9cdc22f8b012e49680d708b
2017-06-09 16:05:31 +00:00
Erik Olof Gunnar Andersson 72e154e7d0 Fixing types.MethodType signature for Python 3.5
The signature for MethodType has changed in Python 3,
and the current implementation won't work, to fix this
we are replacing it with the py 2/3 compatible
python-six equivalent, six.create_unbound_method.
http://six.readthedocs.io/#six.create_unbound_method

This is causing the Python 3.5 tests to fail for the
octavia-dashboard when importing the navigation.py
file, throwing the following error.
> TypeError: method expected 2 arguments, got 3

The following review to fix the gate for the
octavia-dashboard is depending on this patch.
https://review.openstack.org/#/c/471611/

This can also be reproduced by simply executing
navigation.py using Python 3.5.
> python3.5 nagivation.py

Change-Id: Iebca15ae962a1aa0825c6ba6d482206531726696
2017-06-07 12:22:57 -07:00
Cady_Chen 51fe944449 Replace six.iteritems(iter) with iter.items()
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
2016-12-14 11:13:20 +08:00
Ying Zuo 85df9f41b3 Remove type field and type description for create volume from a snapshot
The new volume should have the same type as the snapshot that the volume
is created from. Setting a different type will get an error from the API.

This behavior should be the same when creating a volume from the Volumes
tab and the Volume Snapshots tab.

Closes-bug: #1582458

Change-Id: I0443eb5c6cb18538ff76fc49d4018221691a2ea2
2016-10-21 17:41:54 +00:00
Matt Borland e8e84c2db4 Flavors panel can switch to Angular
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.

Note that we add integration test switches since it can't read the Django
conf.

Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.

Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
2016-10-11 15:49:55 -07:00
Jenkins 0254853577 Merge "Fixed inconsistent names set for BatchAction" 2016-09-29 02:12:59 +00:00
Akihiro Motoki b89c1abfa5 Multiple integration test fixes
This patch represents the following patches, combined:

---

integration tests: retry WebDriver instantiation when conn refused
  https://review.openstack.org/#/c/375042/

We see connection refused which leads to integration test failure randomly.
This seems to come from high load of test infra. This commit retries
WebDriver instantiation when connection refused is returned.

There is no confident this workaround works, but it would be great
if this reduces the number of failures. Let's try.

---

integration test: ensure IPv4 address is extracted
  https://review.openstack.org/#/c/374826/

In test_floatingip_associate_disassociate, IPv6 address is passed
to Floating IP associate API. This commit ensures to pick up IPv4
address of an instance.

Change-Id: Iba71d1e17e252527a82cd53c34dca35723367b28
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Partial-Bug: #1626643
Closes-Bug: #1626536
2016-09-23 17:59:48 +09:00
Ying Zuo 14ab4d1c0c Fixed inconsistent names set for BatchAction
The name of a BatchAction should be one word.

Change-Id: I5172454b23a5aab951a089f05b0f5a04e1a72ba6
Closes-bug: #1626210
2016-09-21 12:57:27 -07:00
Julie Pichon cf0aac9400 Support for Glance v2
Implements wrappers necessary for Horizon to work with either Glance
v1 or v2 and removes the dependency on the Glance v1 endpoint.
Handles the differences between setting properties with v1 and v2 and
restricts some Glance functions that aren't supported in v2.

Implements blueprint: horizon-glance-v2
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Co-Authored-By: Liuqing Jing <jing.liuqing@99cloud.net>

Change-Id: Icca91c53eabf18c3109b3931ed53f70eaaaa0e56
2016-09-12 11:16:33 -07:00
Matt Borland 20bc6e1516 Make 'switch' between legacy and Angular Images
This patch follows on the example that the Containers set, providing
a 'switch' in the panel-enablement file that currently defaults to
'legacy' (Python-based Images panel) and allows for 'angular' (Angular-
based Images panel).

To be clear, this does NOT enable Angular Images.  It's just setting the
stage to do so at some point, or to allow deployers/devs to easily switch
between the two.

A switch both for HORIZON_CONFIG and for integration tests is necessary
due to the way integration tests operate.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I12cd33552218ed1082d2d9a2ae8982639a217a6a
Partially-Implements: blueprint angularize-images-table
2016-08-05 08:17:21 -06:00
Jenkins c2fc95eb48 Merge "Revert "Prevent creation of subnet via RBAC during new network creation"" 2016-07-14 21:50:31 +00:00
David Lyle 31d6e2d4dc Revert "Prevent creation of subnet via RBAC during new network creation"
The policy rule to create subnets requires a target to make the policy check. This implementation does not provide a target, so is not a proper place to use the workflow policy checks. To do this, a more involved approach needs to be used that supplies a target. However, this will be challenging because the target is the network_id that has yet to be created.

This reverts commit 3befade141.

Change-Id: I6af1cbd559034bd5635dfb4360b525714225677d
2016-07-14 18:08:17 +00:00
Jenkins d6b7b70c0d Merge "Improved table deletion efficiency" 2016-06-24 00:20:52 +00:00
jlopezgu b450a03282 Improved table deletion efficiency
Volumes and instances integration tests deleted and validated entities
one row at a time, now they are able to delete and validate multiple
rows at a time.

Change-Id: I7f8fdc7e0ccefdd0f6d71f9f92c8a2aefeec8d54
Closes-bug: #1585209
2016-06-21 14:03:58 -05:00