Commit Graph

115 Commits

Author SHA1 Message Date
Akihiro Motoki
bd68639408 Use unittest.mock instead of third party mock
horizon recently switched from the third-party mock to unittest.mock.
This breaks heat-dashboard unit tests somehow.
We no longer support py27 and we can use the standard library
unittest.mock module. Rather than investigating the cause of
the failure, it would be nice to switch to unittest.mock.

horizon dependency is updated to 18.3.1 as unittest.mock is used
since 18.3.0 and 18.3.0 has an issue that it always requires pytest.
lower-constraints is updated to match horizon requirements.

hacking local-check-factory is disabled temporarily due to
the incompatibility with hacking 2.0 or later.
https://review.opendev.org/#/c/715690/ will recover it.

Change-Id: I517d6d7d36410c64bf48ad958b3e2115725a6491
2020-04-21 04:56:58 +09:00
Zuul
7842190851 Merge "Remove six usage (2/2)" 2020-01-22 06:20:52 +00:00
Zuul
1f11948091 Merge "Remove six usage (1/2)" 2020-01-20 18:15:19 +00:00
Andreas Jaeger
30c4992796 s/assertItemsEqual/assertCountEqual/g
assertItemsEqual was renamed to assertCountEqual in Python 3, and the
testsuite is failing now - rename it.
See also https://six.readthedocs.io/#six.assertCountEqual

This unbreaks the testsuite.

Change-Id: I95c81cfd6ab9bc7384c585ef5aa625dad9a57caf
2020-01-20 16:51:50 +01:00
Andreas Jaeger
79ef24a784 Remove six usage (2/2)
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3,
convert six usage to Python 3 code.

This changes urllib usage.

mock.patch usage in heat_dashboard/test/tests/api/test_heat.py
is modified to cope with the mix usage of urllib from python3 (in
heat-dashboard) and six.moves.urllib (in heatclient).
In the case of the mix usage, patching urllib.request.urlopen() only
does not work as urllib.request.urlopen() is not called after
resolving a lazy loading in six and the resolved object is
six.moves.urllib.request is called. The previous code depends on
the behavior in heatclient read_url_content() and the method should
be mocked instead. Considering this, mocking in api/test_heat.py
is modified to mock direct methods called in the heat-dashboard code.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Icf3f889770242b02023fe22c405cfa2d823581a5
Needed-By: https://review.opendev.org/701743
2020-01-11 22:06:54 +01:00
Andreas Jaeger
7103caa069 Remove six usage (1/2)
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.

This changes everything besides urllib.

Change-Id: I43f76bc07d846341c1f5da69614e2be51ee05e30
Needed-By: https://review.opendev.org/701743
2020-01-11 20:54:19 +01:00
manchandavishal
a0975b6198 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 also fixes failed test cases for django2.2 support.
For information please refer [1]

[1] https://review.opendev.org/#/c/681969/

Change-Id: I3ab81402633b9abe39e49c3921585db992050540
2019-10-30 17:19:18 +09:00
Zuul
de7f249adb Merge "Enforces unicode decoding of data" 2019-09-02 11:12:19 +00:00
mareklycka
837a40e3b7 Enforces unicode decoding of data
The underlying APIs changed between Python2 and Python3, where
once they returned a string, they now return bytes. This change
enforces the decoding of the returned value as a UTF-8. Failure
to decode is handled by the existing exception handling.

Tests were updated to mimic the new API.

Change-Id: I98b474840a163f60e98aed0f75bc6b9df2a9aa00
Story: 2003343
Task: 24381
2019-08-06 12:50:34 +00:00
OpenStack Proposal Bot
06e39a1b26 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I1ed230aa424a6f18d8b92440617447e038d546e7
2019-08-06 10:46:41 +00:00
OpenStack Proposal Bot
a6eb65c0af Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2872f47331515618c34d1511581ab8280dbde78d
2019-08-05 09:16:06 +00:00
OpenStack Proposal Bot
38d72bed17 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I7649507f24214d3607fb928722eb59d61854e1de
2019-08-03 08:41:11 +00:00
OpenStack Proposal Bot
60fb62f17a Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If9e78c53e80a6a104f54400ea5044d7e92cf2e45
2019-06-18 07:14:15 +00:00
OpenStack Proposal Bot
78495ee8a3 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I30d397059390e57865a3dbfb62354d61dffcb52d
2019-05-06 07:46:57 +00:00
jacky06
25415b0e46 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I45befc03377d96c27db8b1d8d78dd7b5bec5ec14
2019-03-27 14:00:03 +08:00
OpenStack Proposal Bot
4c3e4da63b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib24a31e59ad4a404416c798a46033b93a9c88b56
2019-03-20 06:08:00 +00:00
Ivan Kolodyazhny
e4a8ab4a11 Add heat-dashboard integration tests
This patch adds basic tests to verify that heat-dashboard is
installed and could be opened.

heat-dashboard-integration-tests job is added in a
non-voting mode.

Depends-On: https://review.openstack.org/634712
Change-Id: I2550d6fcd1ce4e05502f247e227aaec05e762fcb
2019-02-05 09:40:06 +02:00
manchandavishal
d17cae6e77 Fix gate failures by a new pycodestyle
pycodestyle 2.5.0 introduces E117 over-indented.
This commit fixes E117 errors.

Change-Id: I1e8fdfa95753bc144a987f989f93e75e95d94a30
2019-01-30 17:51:33 +05:30
OpenStack Proposal Bot
840f572ef0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I0f669b2a9695e1054bcf5712407750522875fe1d
2018-10-03 07:29:56 +00:00
Chuck Short
fbbd58a459 Remove mox3 completely
The porting of mock is complete. This fullfills the
community goal
200~"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

This commit does the following code:
- Remove dead code that was previously used by mox.
- Raise the requirement to the Rocky M2 relase of Horizon.
- Convert the clients to use mock.

Change-Id: I33521b4bc8e873d50b1d2390e544eea0923dca4f
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-09-28 05:30:01 +00:00
OpenStack Proposal Bot
e4180839a4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Icf6644d1203680f0e4154af8d9ed0e794d75ed25
2018-08-14 06:23:41 +00:00
Zuul
d3199d5bf8 Merge "Add support of event list pagination" 2018-08-13 23:55:10 +00:00
Zuul
25d10dd303 Merge "Group resource icons by project" 2018-08-13 23:52:22 +00:00
wangqi
df56338490 Use assertRegex instead of assertRegexpMatches
In Python3, assertRegexpMatches & assertNotRegexpMatches
are deprecated in favor of assertRegex and assertNotRegex

Change-Id: I770e45ea04b799fa102887275acc95cdddbfd162
2018-08-03 01:01:35 +00:00
OpenStack Proposal Bot
53b2046091 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ie75366ad30e78ac5311bdfd4184e5ee23eb0567f
2018-07-14 06:06:32 +00:00
Zuul
ed26baa828 Merge "Replace embedded static files with XStatic-*" 2018-07-10 09:15:47 +00:00
irisayame
9c8eed7eda Replace embedded static files with XStatic-*
Remove embedded js/css, add reference in settings,
 add requirement xstatic libs.

Change-Id: I3424e3f965f65eeb4ddcef18a69a7b33918d8a09
Task: #18882
Story: #1753919
2018-07-09 16:02:37 +09:00
Zuul
abae817e2b Merge "TemplateGenerator: Add Designate::Recordset support" 2018-07-09 06:11:16 +00:00
Zuul
9cc6e6112b Merge "Add support of ScalingPolicy" 2018-07-03 09:59:20 +00:00
Zuul
5dd19ff007 Merge "Add support of AutoScalingGroup" 2018-07-03 09:10:20 +00:00
JiyeYu
3f08ce4cf7 TemplateGenerator: Add Designate::Recordset support
Add support for OS::Designate::Recordset as a new resource,
which you can use from Template Generator.

Change-Id: I08bf9dacd35cb1d28e929d5e4763f7586d481606
Task: #19674
Story: #2002033
2018-07-02 13:10:10 +09:00
Zuul
d97a2de918 Merge "Imported Translations from Zanata" 2018-06-26 13:53:56 +00:00
Xinni Ge
d448207b2b Group resource icons by project
Change-Id: I1266a931feff7bb969f0ac752a62cbe4e47f863f
Story: 2002668
Task: 22485
2018-06-25 15:27:25 +09:00
Xinni Ge
6a260ecd5d Add support of AutoScalingGroup
Change-Id: Ib0fc88eddb9bb5b02b158d199b729bf4f42f3a11
Task: #19672
Story: #2002031
2018-06-22 16:24:00 +09:00
Xinni Ge
4b0fcd3016 Add support of ScalingPolicy
Change-Id: I9cc4e8097e0be5ae9d6420cd60eeb4e4b7be2f1c
Story: #2002028
Task: #19669
2018-06-22 15:53:22 +09:00
Xinni Ge
360a7b7a86 Add support of event list pagination
Add pagination support to event list api
and show event list by page in stack detail page.

Change-Id: Ie1699b267a4ca4c33669ea2fccfd170618fc2560
Story: #1343684
Task: #18885
2018-06-21 19:08:53 +09:00
JiyeYu
a2df0bbcca Template Generator: Add support for OS::Designate::Zone
Add support for OS::Designate::Zone as a new resource,
which you can use from Template Generator.

Change-Id: Ie98b2d7b5b6446cb527af14e0e417cca023a79a8
Task: #19673
Story: #2002032
2018-06-21 15:32:57 +09:00
OpenStack Proposal Bot
39beedc55e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Id44e4a452ecd73bd7c2132f036ecd401dbeef1b3
2018-06-20 08:14:25 +00:00
OpenStack Proposal Bot
a65f0928bb Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3609a0d6777f8769a04fa46b89bd48b7eedc01b0
2018-06-14 06:11:07 +00:00
OpenStack Proposal Bot
1dfb76f6ec Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib8c32517e0cb19003c8de8e7f556891d9341945d
2018-06-13 06:12:52 +00:00
Zuul
a95e7aabaa Merge "Add support for OS::Swift::Container" 2018-06-13 03:13:33 +00:00
OpenStack Proposal Bot
350a40c9cc Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2afdd948e48f275193f358bc6a0863733140becf
2018-06-10 07:00:36 +00:00
Ivan Kolodyazhny
311d7d6330 Rename test files to test_* pattern
We're going to switch to default Django test runner by default.
This patch renames test files to make tests descoverable by
Nose and Django test runners without addidional configuration.

Related blueprint: improve-horizon-testing

Change-Id: If4ee8dcd173c2f331bf34cf93c489029489c63ea
2018-06-08 11:34:21 +09:00
Zuul
7a92391864 Merge "Drop mox from HeatRestTestCase" 2018-06-08 02:31:39 +00:00
Charles Short
5eeb7feef5 Drop mox from HeatRestTestCase
Dropped mox3 from HeatRestTestCase, apart of the
community mox3 goal.

Change-Id: Ic161dfdbcb39c29be3980063ed547c6105b60d9a
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-08 11:02:24 +09:00
Zuul
b3b9e2896a Merge "Remove mox3 from TemplateGeneratorTests" 2018-06-08 01:51:16 +00:00
Zuul
77eb14f6a6 Merge "Remove mox3 from StackTests" 2018-06-08 01:28:12 +00:00
Charles Short
53ad52ce5a Remove mox3 from TemplateGeneratorTests
Apart of the mox3 community goal for Rocky.

Change-Id: Iabd07327946c0b5e3641c4c907a00fbf3661beff
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-08 10:27:13 +09:00
Charles Short
23e7ab77cf Remove mox3 from StackTests
Apart of the mox3 community goal from Rocky.

Change-Id: I1833ee4e55a31b5035937a49a1dd21cb72820be5
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-08 10:05:44 +09:00
Charles Short
fccac60a97 Drop mox3 from ResourceTypesTests
Apart of the mox3 removal comunity goal.

Change-Id: I36a3bb836822e6b59f66ac51068a118f4fb4f4a4
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-08 09:39:10 +09:00