Commit Graph

194 Commits

Author SHA1 Message Date
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
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
Zuul 753a19cdfb Merge "Use SetUp and cleanup for the network pagination tests" 2022-09-16 20:28:31 +00:00
Zuul 857d17467a Merge "Add setup and teardown to the instances pagination tests" 2022-08-17 18:16:28 +00:00
Radomir Dopieralski 421df2451c Add setup and teardown to the instances pagination tests
Also delete any leftover instances before starting the tests

Change-Id: I5a7e4e97e8b9ebd62a9dafb6c82edbff69cf23ba
2022-06-29 10:06:36 +02:00
Radomir Dopieralski 81edf08676 Add setup and teardown to the volumes pagination tests
For now just delete the old volumes at the start

Change-Id: I013da554f58e1638178d3655459c9742fd7f85ba
2022-06-29 09:12:36 +02:00
Radomir Dopieralski 4b2df0a684 Use SetUp and cleanup for the network pagination tests
Also fix the case where the last page is not full.

Change-Id: Ia3cbb9a3683c335c301a9ffd8d3d04f222960fee
2022-06-24 13:48:17 +02: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
Akihiro Motoki 866a170379 integration tests: Relax router interface status check
Previously the router interface test in the integration tests
checked the status of an added router interface, but the initial
status varies depending on a network backend used in neutron.
In case of neutron L3 agent, a new router interface has "Down" status,
but in case of OVN a new router interface has "Active" status.
This caused the integration test failure after DevStack switched
the default network backend from ML2/OVS to ML2/OVN.

The initial status of a new router interface depends on a network
backend and the neutron API does not define the initial status,
so it is too strict for the horizon integration tests to check
the status. This commit drops the status check.
It is sufficient to check the existence of a new router interface.

Change-Id: Idfd4a9206e85558ba17e476a47b38ee9c1f566fa
Closes-Bug: #1930405
2021-06-04 16:18:56 +09:00
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
2021-02-12 13:05:27 -06:00
Zuul cc127d9a10 Merge "Add integration-test for Volume Group Type" 2020-12-01 20:06:32 +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
manchandavishal 989eeb41db [cleanup] Remove test-data for heat
This patch removes test-data to run integration test for heat
but heat is no longer a part of the horizon as it has a separate
plugin heat-dashboard. So this patch removes heat test-data.

Change-Id: Id2427c26dd8708b06b941fdd4e3cba0b2dd98808
2020-10-29 07:51:55 +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
Oleksii Petrenko 97797197af Add allow_delete_snapshot_before_volume config option
Adds allow_delete_snapshot_before_volume config option, that controls
whether to test only situation where first test deletes volume and
then snapshot or also second situation, where first test deletes
snapshot and then volume. Second situation is impossible with Ceph [1].

[1] https://docs.openstack.org/cinder/ussuri/drivers.html#rbddriver

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Ib422331892f077d78e3f2efbdd88abafc4c52b9a
2020-09-17 16:57:26 +03: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
Doug Schveninger c52686a06f Using pytest skip to make all of the skip reason equal
since other test are using pytest.mark.skip
see [1] for a list of test that use that approach
for bug 1774697

This allow skip summary report to group like skip
reason to work.

[1] https://github.com/openstack/horizon/search?q=1774697&unscoped_q=1774697

Change-Id: I6a4cd0e472225baca70bd00a1df89060209b04e5
2020-05-07 22:08:41 -05:00
Oleksii Petrenko d6fe0170ee Change horizon test runner to pytest
Changes test invocation from `manage.py test` to `pytest`. Adds addtitional
test requirements like pytest, pytest-django, pytest-html. Adds
`pytest.mark` alongside django's test `tag`. Adds posibility to export test
results into xml and html formats.

Depends-On: https://review.opendev.org/#/c/712315/
Related-Bug: #1866666
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Idb6e63cd23ca2ba8ca56f36eb8b63069bd211944
2020-04-03 13:47:18 +03:00
Zuul 99ade30436 Merge "Fix volumes and volume_snapshots integration tests" 2019-12-02 20:13:30 +00:00
Zuul 8ec32877cf Merge "Fix users integration test" 2019-11-27 13:36:05 +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 f77656cd43 Fix add member integration test
The aim of this PS is to fix skipping add_member
integration test and fixes bugs listed below:
  - Related-Bug: #1777359
  - Partial-Bug: #1774697

Change-Id: I225f9934383c368b03aad00e59d2c7545e144d1e
2019-10-10 10:24:59 -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 f33e5fd8ac Drop deprecated Keystone V2 API support
Keystone V2 API was deprecated in Stein release in Horizon and
removed from Keystone in Queens release.

Change-Id: I917e273d3174adf0874e516b3d635ccb8ba58a27
2019-09-12 17:15:07 +00:00
Ivan Kolodyazhny 0c8de3eb4c Add non-voting integration tests job
Thi patch skip integration tests which fails on gates until specified
bug will be resolved.

@decorators.skip_because doesn't work somewhy so I used unittest.skip
instead of it. I'll fix skip_because decorator in a follow up patch.

Related-Bug: #1792028
Change-Id: Ida79b5064c2457afc15db6e63a45478d711e02b5
2019-01-18 19:50:51 +00:00
Ferenc Cserepkei 4676694179 Add "prev" link to instance page list pagination
Currently there is no link to previous page at paginated instances
table. This patch resolves that issue by re-using the pagination
code for flavors.

It also supports Ying Zuo's scenario:
After I set only 1 item per page and deleted the instance on the first page,
the expected behavior is showing the next instance in the table after one is
deleted.

xxxIndexView uses PagedTableMixin's _get_marker() from now instead of GET()-
ing the markers

Closes-Bug: #1274427
Co-Authored-By: Dmitry Ratushnyy <dratushn@cisco.com>
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Id8eaae6bf1b5d6f42291291655e14b8715c08bc8
Signed-off-by: Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>
2018-12-28 20:46:11 +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
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 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
Van Hung Pham 6707af83c6 Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex()

Change-Id: I3f25205c0fd0d47ed7d5d76c2f11dd91360f2a26
2017-05-31 01:17:08 +07:00
Béla Vancsics ff733ceced Use more specific asserts in tests
Instead of assertTrue and assertFalse use more specific asserts.
They are compatible with Python 2.7[1] and 3.4[2]

[1]: https://docs.python.org/2.7/library/unittest.html
[2]: https://docs.python.org/3.4/library/unittest.html

Change-Id: I9b07cc324757f35b1e8431b715412bf5d7fa8ecb
2017-02-15 11:19:43 +01:00
Cao Xuan Hoang f8851fbdd6 Use assertGreater(len(x), 0) instead of assertTrue(len(x) > 0)
assertGreater provides a nicer error message if it fails.

Change-Id: Id9a2e11e21cca87bb4ef23ced5bbbae6817dba73
2016-12-09 11:11:41 +07: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
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
Luong Anh Tuan ac404c4bcf Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual(observed, expected).

The correct order expected by testtools is
assertEqual(expected, observed).

Change-Id: I83b7009f9b32f4abc88c23cafbe293b65dc25fb4
Partial-Bug: #1259292
2016-08-16 12:02:45 +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 89d0418a34 Merge " Fix some spelling mistakes in horizon intermittantly should be intermittently finctionality should be functionality funcionalities should be functionalities" 2016-06-24 18:07:52 +00:00
Jenkins d6b7b70c0d Merge "Improved table deletion efficiency" 2016-06-24 00:20:52 +00:00
gecong1973 0854bb9962 Fix some spelling mistakes in horizon
intermittantly should be intermittently
  finctionality should be  functionality
  funcionalities should be functionalities

  Closes-Bug: #1595439

Change-Id: If04aa2170a0c27ebfa89a1e3fa1539ea0e52f7b6
2016-06-23 17:04:35 +08: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
Jenkins b4fc2b0939 Merge "Prevent creation of subnet via RBAC during new network creation" 2016-06-17 21:32:32 +00:00
Jenkins fa6aa731c9 Merge "In integration tests prevent getting volume size too early" 2016-06-10 11:22:41 +00:00