Commit Graph

57 Commits

Author SHA1 Message Date
Luigi Toscano 18921beb2e Test fixes: unittest.mock, better l-c job, pytest dep
Now only python 3 is supported, which means unittest.mock
can be used instead of the external mock module.
This change can be done thanks to the Horizon
change I2de669d8e89b8daeb7ee5405ffab35af6307c40b

Switch to openstack-lower-constraints-jobs-horizon
which pulls in the last horizon. The lower-constraint
version of horizon should be bumped when a new
version (post-18.2.0) is released.

Finally, add pytest to the set of test requirements
to prevent an missing import error (even through
the sahara scenario tests still need to be ported
to pytest).

Change-Id: I2c61e9d88b2d05c9f0b68066d7bb15b43cdf083f
2020-04-15 17:59:11 +02:00
Andreas Jaeger 24e6863ba7 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, it's not needed
there for co-installing.

Change-Id: I3d250ba82cc14f163f4295381b9b9c232486ac9f
2020-03-31 17:38:17 +02:00
manchandavishal 3584317a46 Use Horizon project template for django jobs
Horizon defined a project template 'horizon-non-primary-django-jobs'
for django jobs. This patch use that template to run django jobs
here and fix the failed test cases for django2.2 support by replacing
None with an empty string and add renderer argument.
For information please refer [1], [2], [3].

[1] https://review.opendev.org/#/c/681969/
[2] https://github.com/django/django/commit/6fe9c45b725
[3] https://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1
Change-Id: I9a62bb0a56b16cd6caa6cc9bf7db9b85c99ed580
2019-10-18 17:48:25 +00:00
Luigi Toscano bd66017874 Native Zuul v3 dashboard-integration test
- create a native Zuul v3 job, and move it to experimental
  until it works;
- install libav-utils on dpkg systems and enable the capture
  of the video;
- adapt to the changes in OverviewPage:
  * go_to_system_flavorspage -> go_to_admin_compute_flavorspage
  * go_to_compute_imagespage -> go_to_project_compute_imagespage

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

Story: 2001686
Task: 8662

Change-Id: I311203779bd3e6c6660cfe1b84e89c7dc0825c98
2019-02-21 00:47:34 +01:00
Chuck Short d2fc81c0c5 Remove dead code
Now that mox has been removed we can remove the create_stubs
helper function as well.

Change-Id: I1c7c8e234013c28e3bbd20ba18e8bfab313a8533
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-08-26 21:22:47 -04:00
Akihiro Motoki 72a6a7a94b Switch test runner to django default runner
nose is not actively maintained now and Django default test runner
seems to have enough features.

* Horizon test setting no longer depends on nose and related stuffs.
  This commit cleans up nose related dependencies.
  The change was made in horizon Rocky-3,
  so horizon 14.0.0.0b3 is required at least.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* run_tests.sh is no longer called from tox.ini, so it can be dropped.
  Note that the similar run_tests.sh in horizon was dropped long ago.

Change-Id: I1e5471078cc95031e8819f01100319a9ee2a3a73
2018-08-21 23:16:36 +09:00
Luigi Toscano 56b69d6477 Goodbye mox - no more needed
The porting to mock of sahara-dashboard is complete.
This fulfills the community goal
"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

Raise the requirement to the Rocky M2 release of Horizon,
which drops the usage of mox by default (it should be
explicitly enabled). Without a forced import from Horizon
the mox dependencies can be dropped here.
Bump also a dependency needed by this new version of Horizon.

Change-Id: Iaf272af9919f8a69562c0a469130bbf8628936cf
2018-07-04 19:38:21 +02:00
Ivan Kolodyazhny 23dbfa570c Explicitly use django_nose.NoseTestSuiteRunner
Horizon is going to switch to Django Test Runner [1].
To not break Sahara Dashboard we need to use Nose Test Runner
until we'll be ready to remove Nose from sahara-dashboard.

[1] https://review.openstack.org/#/c/544296/

Change-Id: Ic248f7cc716ea0cfe8a6398438efa0a39228db85
2018-06-05 13:31:11 +00:00
Charles Short a262a42a94 Drop mox usage in SaharaApiTest
Apart of the mox3 community goal for Rocky.

Change-Id: I8f464e10f800eddfe0183fb3c2c152e37f001097
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-13 09:27:34 -04:00
Charles Short 787cc08789 Mox removal for DataProcessingJobTests
Apart of the mox3 community goal for Rocky.

Change-Id: I90bde341d5a1c1ede967a76633385d336f2c563f
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-04-26 22:19:21 -04:00
Luigi Toscano dd3f3c8810 Require the (soon-to-be) Rocky version of Horizon
... or at least the first published tarball which will lead to Rocky.
On the other side this means forcing the usage of mox as long as
there are tests that depends on it (the switch was already flipped
in Horizon, so it needs to be enabled here).

This allows us to depend on newer Horizon features, including changes
to the test suite that are useful for the mox removal effort.

Change-Id: Ibf95b642f49aee9b3165f46e0422ff6bf56e9391
2018-04-23 22:30:53 -04:00
Luigi Toscano 6bd1b2a61e heat_data was removed from Horizon
blueprint heat-dashboard-split-out

Change-Id: Ied6ee62f91a0a09d15ae1b03618ec0fb3c6f4574
2017-12-11 13:10:34 +01:00
Vitaly Gridnev 35dd26ca92 fix unit tests for sahara-dashboard
Change-Id: I98fc347f8195bcc38dd194461bd14f5a5f456616
2016-11-23 13:35:30 +03:00
Vitaly Gridnev 6deb3c5fcb Fix gate jobs
After change Icca91c53eabf18c3109b3931ed53f70eaaaa0e56
method "image_list_detailed" returns list of "Image"
instances which inherit from
openstack_dashboard.api.base.APIResourceWrapper.
For getting "image_type" attribute we need to use "get"
method now.

Closes-bug: #1624318
Change-Id: I363ddc1bc46a1daa855d1d41920bf8a4a4df2396
2016-09-19 16:57:35 +03:00
Mikhail 479c5bf2f1 Fix DataSource integration test
DataSource creation workflow has only one step.
According to commit I11d17535180cfa38b32463143f0e40cf7a119d9c we
have to change TabbedFormRegion by FormRegion, because previous form
locator is no longer present.

Change-Id: I64527df2aa188ee161f541f5c5c5c0a7598d08d0
2016-09-12 09:03:55 +00:00
Vitaly Gridnev 8fa78b9d9c plugins api support
this change contains implementation:

1. of updating plugin workflow;
2. page with details of plugin labels;
3. only enabled versions are displayed on general
page with plugins.

blueprint: plugin-management-api
Change-Id: Ia125ad8108cafd4e39dc1c2c53f3c62ff3ce3e78
co-authored-by: Michael Lelyakin <mlelyakin@mirantis.com>
2016-08-22 09:19:46 +00:00
Jenkins 51ff3a8eee Merge "Designate integration" 2016-08-17 17:48:40 +00:00
Vitaly Gridnev 7c9eb9dbbb use xenial ubuntu for integration tests
Change-Id: I6e04e8fb4b5d15ddef7fef3db3f909a4e8344782
2016-08-16 15:16:12 +03:00
Michael Ionkin 1eb34dd38a Designate integration
added designate client;
added SelectDnsDomain step in Cluster Template creation form. This
step is available if we enable dns service. This step contains one
dropdown list of available dns servers.
Domain Name is not required field so if it's not selected then
a cluster will be launched without designate usage.

partial-bp: designate-integration
Change-Id: If3e994026d012b9b33d59c8477d6f2a892f61374
2016-08-12 10:10:53 +01:00
Thomas Goirand 17a24fb49f [Django 1.10] django.conf.urls.patterns() removed
Remove old style URLs (again).
These are deprecated in 1.9 and removed in 1.10.

Change-Id: I851a9c61f64ec6d258d7c49401bb61cf5cc1fe3d
Partially-Implements: blueprint dj110
2016-07-23 22:21:10 +03:00
Vitaly Gridnev 5bd39f4f0f replacing plugins into separate panel
this change is just replacing plugins tab to a
separate tab group.

blueprint: plugin-management-api
Change-Id: I7d1a93fbacec0ad0d2551189d89033c92d7fb3d7
2016-07-19 12:22:20 +03:00
Vitaly Gridnev 6e6848a2bb fix unit and integration tests
this include the following:

1. using horizon settings for running unit tests instead of
   specific for sahara-dashboard;
2. using fedora image for integration tests;
3. job timeout is not enough to complete 2->3 nodes scaling
   in devstack. using 1->2 scheme instead.

Change-Id: Ifbff37f61f32a7de26ed49dcf08e1a43dc597696
2016-07-18 19:08:23 +00:00
Michael Ionkin 03c6802f66 Fix unit tests
unit tests failed because of patch in Horizon:
https://review.openstack.org/#/c/144152

Change-Id: I6a5f88219543fee25d08b41f6bbc967e5a6fdfa8
closes-bug: 1595194
2016-06-22 16:46:29 +03:00
Vitaly Gridnev 221042cba4 fix integration tests again
delete_flavor method is replaced by delete_flavor_by_row

Change-Id: Ie5a69d46ce9d83ff221d1d2c2e84e70fdff0fc38
2016-06-08 15:22:17 +03:00
Vitaly Gridnev ffccd9dcd9 fix integration tests
The reasons of failures are following:

1. The change [0] is introduced in horizon, which removes unneeded
tags in production envs. This caused most failures.
2. HDP is removed from sahara codebase.
3. Sometimes unicode string 'None' is passed to saharaclient as input_id
or output_id of job. This string was translated to NoneType.

[0] https://review.openstack.org/#/c/287793

Co-Authored-by: Michael Ionkin <mionkin@mirantis.com>
Change-Id: I9cb0641b2b61a78a40b0e2c6faf2609f974088d2
2016-06-06 17:24:29 +00:00
Georgy Dyuldin 900266a320 Add testcase 'Run EDP jobs with many types'
This testcase checks creating and launching many EDP job with all
possible types, such as Hive, Spark, Pig, etc

Change-Id: I503e525e48a98e0d14af145256d8e65c2c1582b4
2016-05-14 21:45:26 +00:00
Georgy Dyuldin 10476765e7 Add testcases 'Update EDP resources'
Testcases check updating data sources, job binaries, passing extra
parameters to job templates on launching it.

Change-Id: Id443d6a716309df0add9235634c27c2e12876b8e
2016-04-27 14:45:39 +03:00
Jenkins fb96b10183 Merge "Hiding undesired nav-pills" 2016-04-11 11:19:40 +00:00
Chad Roberts a79038648e Hiding undesired nav-pills
Recently, nav-tabs became nav-pills.  That lead to them
showing-up in places we were previously hiding the
nav-tabs.  This change hides all pill-tabs in places where
we'd rather not see them.  It also refactors the hiding
a bit.  Eventually, we will need a common library for
shared scripts between jobs and custers, but this
addresses the bug at hand for now.  Also updating the
datasourcepage so that it no longer expects a tabbed
form (since the only "tab" that was there is now hidden).

Change-Id: I31dd0c402580d5414769bddecdc077b01eac4379
Closes-Bug:  #1566396
2016-04-07 13:29:49 -04:00
Georgy Dyuldin 0a56b44694 Add testcase Update nodegroup in cluster template
Testcase checks updating nodegroup template which used in cluster
template.

Change-Id: Ic088644fb8c654cb00d7ca548580391280272989
2016-04-06 08:36:30 +03:00
Georgy Dyuldin d6349ffd6b Add testcase 'Update cluster template'
Testcase checks updating existing cluster template in Horizon dashboard.

Change-Id: Ied781ba06a7985add20724151022404a611608c9
2016-04-05 10:03:40 +03:00
Georgy Dyuldin e62e51640a Add testcase 'Update node group template'
Testcase checks updating of existing node group template in Horizon
dashboard.

Change-Id: I68fe1312f35935ba1b5fb80bdb8958c872a3b242
Depends-On: I08e5f698695718dcb7125f12e1d80753b0eca8d3
2016-04-05 00:26:25 +03:00
Georgy Dyuldin 410f69b96f Add testcase 'Run EDP job on cluster'
Testcase checks running edp job on cluster created with Fake Plugin in
Horizon dashboard

Change-Id: Ie6a785fec1319aa2742c8d4fab048733f68bcf1c
2016-03-24 11:53:50 +03:00
Georgy Dyuldin a04d5348d0 Add testcase for check cluster scaling
Testcase check cluster scaling (increase working count) with Fake Plugin
in Horizon dashboard

Change-Id: I89158ae846443bf7af0d421220aa43bae5c6d3a8
2016-03-23 17:01:46 +03:00
Georgy Dyuldin 710dba527d Add test 'cluster create-delete with fake plugin'
Testcase check cluster creation with Fake Plugin in Horizon dashboard and
deleting it after creation.

Change-Id: If36410d4e37ccd7c526d6ead8c33c8ef326faf09
2016-03-11 13:51:21 +03:00
Vitaly Gridnev 46d9adb665 implement health checks in sahara-dashboard
following things are done in change:
 * action to verify cluster;
 * view to display health check in cluster details;
 * new column for the health overview in clusters list.

Implements blueprint: cluster-verification
Depends-On: I598753cbb33d7781b646e726ad8d614e924e4876
Change-Id: I6c47d564400872ec4f38bf9d5824f93f4599181c
2016-03-02 11:22:48 +03:00
Nikita Konovalov 09eafa0f6f Import reorg and cleanup
The imports order should follow the simple rule of
groups. There are usually 3 groups in most cases.
However this repository is a plugin so imports from
the base system (Horizon) should be moved to a
separate group.

So imports should go into the following groups:

1) Imports from Python standard modules
2) Imports from dependencies previded in requirements
3) Imports from Horizon
4) Imports within current project

Change-Id: Ie028a4aa6897a3400872a45b94b073b2819ee4ac
2016-02-26 19:29:39 +03:00
Chad Roberts 23e1b0b19e Changing name of "Data image registry"
The name "Data image registry" is not very good.
Given that the image registry appears under the
data processing panels, it should be obvious that
it applies to data processing.  Therefore, I am removing
the "data" part of the name.  Also updating the
integration test that references this page and
cleaning up unused code from views.py.

Change-Id: Ie60c8e3154ae9f640f154ca26d42c0c0a569b9a5
Partial-Implements: bp reduce-number-of-panels
2016-02-22 16:57:47 -05:00
Chad Roberts 7d3f48c0ce Fixing up integration tests after UI reorganization
This patch reorganizes the integration tests so that the
pages are in-line with the new UI layout.

Change-Id: Icf3fb352187698f544dd7234d66df1f9c5c65a16
Partial-Implements: bp reduce-number-of-panels
2016-02-19 08:52:49 -05:00
Jenkins b3dec2d07a Merge "ACL support in Sahara UI" 2016-02-10 16:03:20 +00:00
Jenkins d1f2e73c4a Merge "Fix failing job_binaries i9n test" 2016-02-08 15:28:44 +00:00
Timur Sufiev a010f43385 Fix failing job_binaries i9n test
Test was failing due to Create Binary Job form fields being filled in
a wrong way.

Change-Id: I48d003fc4ed1bbb6044acd60e033ec864ad470b3
Depends-On: I5b84fd3b769ae559cea484319b6b8956b80f99ae
2016-02-01 16:50:40 +03:00
Vitaly Gridnev 2d548be434 ACL support in Sahara UI
Sahara started support of is_public and
is_protected fields, so this change brings that
to sahara ui.

Implements blueprint: ui-acl-support
Change-Id: I67acfed8973afe2efd4ef046b1bf936cb9b2c3fa
2016-01-28 20:41:55 +00:00
Nikita Konovalov 705855e3da Remove microseconds from sahara_data
The datetime format that is returned by API does not have
microseconds. Removing it from test data.
Date and time should be separated with a "T".

This change will allow further improvements like adding
duration columns.

Change-Id: I20c28059c3f1aa110c57f8613a762ced0c8f8db1
2016-01-28 16:49:06 +03:00
Timur Sufiev 823139cc8e Adapt for all horizon i9n refactoring changes
Adapt to the cumulative change in Horizon i9n tests being merged in
https://goo.gl/HLQCe7

Also there was https://review.openstack.org/#/c/269123 that dropped
all pre-Django18 code from Horizon, that was another cause of failed
tests (missing horizon.utils.urlresolvers). Fixed that.

Change-Id: I12b85202e79089fa5b1e7464dd0d529c81cde07b
2016-01-27 10:58:59 +00:00
Timur Sufiev 91a5be83df Adapt for horizon i9n referencing table columns by name
Change-Id: I9cf0314b7ca5c4eb9aca936cbbaa102fc74e643c
Depends-On: Id788fc288d052c91fc84e94c91ce2a368e8a810a
2016-01-21 16:24:19 +00:00
Timur Sufiev a8b7df2a92 Adapt for horizon table page region simplification
Change-Id: I929c00450820517857b70b43c33b9e9946c286bf
Depends-On: Ic8e4d44beb1ae5f99c096fc796420f2f8306feb0
2016-01-18 13:29:44 +00:00
Jenkins d773bac4e8 Merge "Adding cluster template support for shares" 2016-01-06 21:00:30 +00:00
Jenkins 56fbd78bfb Merge "Adding node group template support for shares" 2016-01-05 17:19:58 +00:00
Timur Sufiev 6eafe0e620 Run actual integration tests in post-install hook
Change-Id: I8baa8783d8bcdf36a45da21b5e68bdea163c7a3a
2015-12-31 15:32:33 +03:00