Victoria-1 milestone passed and release deliverable files are settled,
so it is time to update the plugin registry.
* adjutant-ui has the first release in Ussuri
* congress-dashboard repository has been retiried
along with congress project retirement.
* neutron-fwaas-dashboard master branch was removed
along with neutron-fwaas master removal from neutron.
Special entry for mistral-dashboard in list-horizon-plugins.py
is no longer needed as the corresponding release deliverable file
has been fixed.
Change-Id: I3a48552da67329511f84994f7ee2be4fcecab374
unit_tests.sh has a lot of duplicated statements.
This commits introduces run_test function to clarify the differences.
selenium_tests.sh is also updated to clarify which positional
arguments are used. Direct usage of $1, $2 is not easy to understand.
Change-Id: Ie13f0a804968d548b3c13b0d87daa745dd2ad040
The pytest migration patch introduced a couple of regression in
tools/unit_tests.sh:
* We no longer cannot run a specific test explicitly
(per python file, per test class, per specific test).
Per module like openstack_dashboard, openstack_auth and horizon
is the only possible way after the pytest migration.
* openstack_dashboard tests outside of openstack_dashboard/test/
are not looked up when a subset is specified.
This commit restores the orginal behavior.
pytest uses a different way to specify tests.
We cannot use the style of python modules like
"openstack_auth.tests.unit.test_policy.PolicyLoaderTestCase.test_policy_file_load"
and we need to specify tests like file paths [1].
[1] https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests
Closes-Bug: #1875123
Change-Id: Ic4b6c69d8a2ed774cce16521c4c4336f55ff737e
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
The plugin registry is maintained manually, so it tends to be out-of-date.
The deliverble files in openstack/releases repository provide information
on repositories and bug trackers. It sounds reasonable to me to generate
the plugin registry based on infomration in the openstack/releases repo.
The script added picks up deliverables marked as horizon-plugin.
mistral-dashboard and networking-bgpvpn dashboard are released in
different ways, so they are handled specially in the script.
How to run:
./tools/list-horizon-plugins.py \
--csv-file plugin-registry.csv \
../releases ussuri
Note that this commit does not autogenerate the plugin registry.
The script still needs to be run manually.
Further automation would be the next step.
Note that bug trackers of senlin-dashboard and trove-dashboard in
the releases repo looks out-of-date. I will submit a fix for them soon.
The downside of the automation is that we cannot list non-official
horizon plugins but I believe it is a good compromise.
The only non-offical plugin listed now is the group-based-policy UI,
but it is questionable whether it is still maintained well.
Change-Id: Id56be13fb93c6dc123e7cfb1c906357cdf59732b
This command checks the configuration for invalid and deprecated
settings, as described in
https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html
There is also a script in tools/find_settings.py that scans all python
files for the potential new settings, which is supposed to make it
easier to update the lists that the checks use.
Change-Id: Ie85cf4be3da1ab446c10883a4580e20ea154b67c
Story: 2003657
Task: 26132
This commit changes to run test_plugins in a separate process.
test_plugins touches urlpatterns and Site registry during setUp(),
but the cleanup process in tearDown does not recover urlpatterns correctly.
After tests under test_plugins run, the urlpatterns continues to have
entries of test panels and this leads to NoReverseMatch error when
rendering other panels after that.
I investigated details in setUp/tearDown of PluginTestCase but failed
to find a good solution to recover urlpatterns and Horizon Site registry.
As a workaround, runnig test_plugins in a separate process can avoid
the issue.
Closes-Bug: #1809983
Change-Id: I848f6b341b3f93ed055955b2b12d2497811edc5a
Nose has been in maintenance mode for the past several years. It has
issue with exit code [1] which leads to false positive results for our
seleniun-headless job.
This patch changes test runner for Horizon tests and does the following
things:
* Django test runner executes test in a different order than Nose does.
That's why we've got an issue with side-effect in
horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch
adds workaround to it.
* Rename filename of test files to names starting with 'test_'
so that the django test runner can find tests expectedly.
* '--with-html-output' option is temporary dropped and will be added in
a following patch.
* Integraion tests is marked via django.test.tag mechanism which is
introduced in Django 1.10
* 'selenium-headless' is broken now because we don't have geckodriver on
gates, this patch makes it non-voting.
* 'tox -e cover' is fixed
* Remove @memorized decorator from
dashboards.project.images.images.tables.filter_tenant_ids function.
[1] https://github.com/nose-devs/nose/issues/984
Depends-On: https://review.openstack.org/572095
Depends-On: https://review.openstack.org/572124
Depends-On: https://review.openstack.org/572390
Depends-On: https://review.openstack.org/572391
Related blueprint: improve-horizon-testing
Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
Added '--verbosity 2' to print list of executed and skipped tests to the
console.
Related blueprint: improve-horizon-testing
Change-Id: Ibdc4016bb1f8b7145a78b0f0bfc693741b6a123e
This patch also adds checks for executable files in
pep8 job.
nose ignores executable files by default, so it is important
to ensure executable flag is not set for test files [1].
openstack_dashboard/test/test_plugins/panel_tests.py was not
tested actually and it was broken. This commit fixes it too.
[1] http://nose.readthedocs.io/en/latest/usage.html#cmdoption-exe
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: I3a124fa2f9f0676b2b43a094e32e3d8b18fa6005
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
Moves Django OpenStack Auth content to Horizon, since they are so
tightly coupled. This cleans up the development workflow and should
make keystone / auth related contributions easier.
Implements: blueprint merge-openstack-auth
Change-Id: Ia1cdc47bad1ca6e633073a9f9445b0c7f70d05bc
Tox runs tests via unit_tests.sh which when not
running a test subset will mean tox only checks for
the final exit code. This means horizon test failues
will not be seen by tox unless openstack_dashboard
tests also fail.
This change forces an exit code which !=0 if either
test run fails.
Change-Id: I8fbcb834d9817e7eea1b2c39fc4caab6004b981b
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.
After this, there are 8 noqa under horizon/ :)
In addition to this, the following changes are made.
horizon/exceptions.py: The following imports are dropped.
They are not used anywhere.
from django.http import HttpRequest
from django.views.debug import CLEANSED_SUBSTITUTE
horizon/forms/__init__.py:
Some entries were missing in __all__. They are added.
Change-Id: I33b504ef6c396f0675e8a340867e2ca59c77c684
- Updated tox envlist, so just running `tox` from the CLI will now run all
voting gate tests
- Reduce duplicated definitions and commands
- Remove any reliance on run_tests within tox
- Removes all doc references to run_tests.sh, and replaces them
with their tox equivalent. Where necessary, language around the tox
commands has been altered or extended so that it makes sense and is
consistent with other parts of the docs. Also adds a new "Test Environment"
list to the docs, so that newcomers do not have to piece together CLI
commands and their cryptic extensions from tox.ini
- Move the inline shell scripting to its own file. Also fixes a bug when
passing args, since the logic assumed you were attempting a subset test
run (try `tox -e py27 -- --pdb` on master to compare)
- Moved translation tooling from run_tests to manage.py, w/ help text
and arg restrictions. This is much more flexible so that plugins can use
it without having to copy commands, but still defaults to exactly the
same parameters/behaviour from run_tests. Docs updated appropriately.
- Removed npm/karma strange reliance on either .venv or tox/py27. Now
it only uses tox/npm.
Change-Id: I883f885bd424955d39ddcfde5ba396a88cfc041e
Implements: blueprint enhance-tox
Closes-Bug: 1638672
Currently developers need to manually build a constratined venv if they
want to match the versions that are tested in the gate. This change
adds logic to run_tests.sh and install_venv*.py to default to the same
constraints file used in the gate.
With constraints enabled the 'churn' in the environment should be
minimised so remove the developer optimisation for detecting when
packaged versions change and always just install/update. This has the
down side of making the script preamble slightly longer but we always
print_help() so I don't think it'll be terribly inconvenient.
Change-Id: I9bf85adb5aa2c85d8c0f0f22ac9efe5cac3646c0
Closes-Bug: 1644697
Don't rely on a particular workspace name, as it changes when job's
name changes.
Depends-On: I28d84235fb51a49492ed9c96794ba74f317f66b6
Change-Id: I63e45ee89711b429d0d878303aefeec4b159125a
Closes-Bug: #1625253
We want to allow for integration tests to test deprecated panels. This
means that we need to override the configurations provided by the panels
and force a 'legacy' setting.
On the Infra side, we need to pass in an environment variable that tells this
override to be enabled.
Depends-On: I20232ef16ae60a7151e267b506af471ebfed2f7f
Change-Id: If5a3e273098aa726e12f9076c0273a5afaf233d2
Partially-Implements: blueprint test-deprecated-features
It fixes two small but important bugs:
- remove apache restart, because it fails pre_test_hook, which fails
test build (the latter implication was introduced recently in a
devstack-gate scripts);
- fix sidebar menu item click before prev item was collapsed, because
in this case menu item won't be expanded (supposedly a result of
recent update of one of XStatic dependencies).
Change-Id: If463c4c8b16b54f033e2a2ee33ba995ca7844f2b
Closes-Bug: #1573726
Test checks that create/delete stacks actions are executed without
errors under admin user.
Stacks page object was defined similar to other pages.
Few other modifications I've made:
* horizon.conf - service_available section with new heat option
* stack template is added as separate file
Depends-On: I1f5dc1220aee39103289a579583095346cce0354
Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ibc549f9ae4eac17d8e92d65afe1c5cee9be6e72e
The set -x enabled line-by-line tracing within a bash
script. This makes it easier to follow gate logs.
Change-Id: I7a164cf94f661929d96f2c3d41ec0d2ad1530e32
This patch enables the Angular Launch Instance workflow by default. The
toggle has been maintained for those running the Python workflow, and
also for the integration tests to run against both simultaneously.
Keep integration tests running for a legacy Launch Instance workflow
by means of a separate local_settings.d code snippet activated before
starting the tests.
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: Id0c57b33df46397711e32092cec6cc5268841779
Implements: blueprint enable-angular-launch-instance
This will allow us to modify devstack environment of a
dsvm-integration job independently of infra repository, once
https://review.openstack.org/#/c/269578/ is merged. This is a
preparation to integration testing of Heat-enabled panel in Horizon,
since Heat is disabled in Devstack by default.
Change-Id: Id9ab8e846c33921e1c55e459056345c8d14204fd
Using scripts inside horizon repo in test hooks we could not bother
infra folks each time when we need to do some change to test job.
The second part of the proposed change is to run these scripts at gate,
see https://review.openstack.org/#/c/263457/
Related-Bug: #1526791
Change-Id: Ic2d60df846e876530662046d75c3e56e7841ba30
While browsing through the Horizon repository, I came across a
few spelling errors that need correction.
Change-Id: I593e9f04ea5d9f3985a14fb994b745243468387a
Closes-Bug: #1511532
An approach to i18n for Angular HTML templates using babel. This patch
allows only singular translation. Plurals and context will be
addressed in subsequent patches.
Based on Thai Tran's work at https://review.openstack.org/#/c/187321
This patch implements a custom extractor in
horizon/utils/babel_extract_angular.py. pybabel really wants this to be
a package installed into site-packages. I have not done this so as to
avoid introducing a dependency on another change to global requirements
just yet. I will upload a package to pypi in parallel so that we can
start using it in the future.
For now, I have had to modify tools/with_venv.sh to add horizon to the
PYTHONPATH. This is less than ideal but seemed to be the least worst
option.
Steps to verify that it works:
1. Create a new html file in horizon/static or openstack_dashboard/static
2. Add something like <div translate>hello world!</div> to the html
To test interpolation add something like:
<div translate>hello {$name$}!</div>
3. Run ./run_tests.sh --makemessages
4. Inspect your djangojs.po file, it should be there.
The following steps are optional:
5. Run ./run_tests.sh --pseudo de
6. Run ./run_tests.sh --compilemessages
7. Go to http://localhost:8000/settings
8. Change Language to Deutsch
9. Go to http://localhost:8000/i18n/js/horizon+openstack_dashboard
10. Your translated text should be there as well.
Note: There are now unit tests as well.
Partially-Implements: blueprint angular-translate-makemessages
Depends on: If4352aba01ce0ca6337f590c0689d8fe9f0867c8
Change-Id: I26d4fef8646d5f038918cd3376dbbdbef37eb603
This is modeled after the nova script to do the same thing.
Removes reviews over 4 weeks old that are either failing Jenkins
or have a -2.
Change-Id: I636738c873c1b64ba1aa24fd7643b2fac9b1975b
A tool to allow pseudo translations to be created in order to identify
potential translation problems. To use the tool:
Make sure your English file is up to date:
./run_tests.sh --makemessages
Run the pseudo tool to create pseudo translations:
./run_tests.sh --pseudo de
Compile the catalog:
./run_tests.sh --compilemessages
Run your dev server. Log in and change to the language you pseudo translated.
It should look weird. More specifically, every translatable string is going
to start and end with a bracket and they are going to have some added
characters. For example, "Log In" will become "[~Log In~您好яшçあ]"
This is useful because you can inspect for the following:
- If you see a string in English it's not translatable. Should it be?
- If you see brackets next to each other that might be concatenation.
- If there is unexpected wrapping/truncation there might not be enough
space for translations
- If you see a string in the proper translated language, it comes from an
external source. (That's not bad, just sometimes useful to know)
- If you get new crashes, there is probably a bug. :-)
Implements blueprint: pseudo-translation-tool
Change-Id: If97754c2d4234b12b3d73616ff60527f6ad82d55
This is incorrect and should never have been added. The order of
lines in requirements files affects the pip dependency resolver.
Therefore, while it's nice to add new packages in alphabetical
order, it must not be required.
Move pbr to the top of the list as it should always be installed
first. Move hacking to the top of the test-requires list.
Change-Id: I81f7e75b77baccd12d9660dc009f30f2f2c891bc
Sync from oslo-incubator commit 46f2b697b6aacc674bc040a8751997ed70490d1a
Major changes of the import are related to update policy module:
0da5de6b54 Allow policy.json resource vs constant check
5d1f15a778 Documenting policy.json syntax
33533b0d97 Keystone user can't perform revoke_token
Most changes are style-related topics:
* Improve Python3 compatibility
* Remove vim modelines
* Support Per-log-level logging translations
Closes-Bug: #1296337
Change-Id: I09f61b10b1b36015d248de25c5c6ed994717a565
This makes code more readable, and can check whether specific library
in the requirement files easily. We enforce the check in pep8, We also
add the tools for checking requirements.txt and test_requirements.txt.
Change-Id: Ia0a24553b7a5204faf6413c17dae6ba6aae2b5e8
Closes-Bug: #1285478
The new version of install_venv_common evaluates requirements.txt
and test-requirements.txt at the same time and we avoid Django 1.6
is installed when evaluating django-nose dependencies.
Change-Id: I2ab7108b3615ac6c0525089b81b80e5c0a4793fc
Closes-Bug: #1250581
and tools/test-requires to test-requirements.txt
These are standard files and tools in the
general world are growing intelligence about them.
Change-Id: Iac3c680dd19cabd8ea38598a6e2bb27238030a2d
Fixes: bug #1179008
This adds python-heatclient as a dependency and a simple function
to get a client reference.
Required for blueprint: heat-ui
Change-Id: I5f7d8c7c17f6e78d3f88cc39d50826416b48ad2c
This then allows the resulting date value to be piped
to one of the standard django date/time format filters
This is identical to oslo timeutils parse_isotime, but annotated with
@register.filter
Required for blueprint: heat-ui
Change-Id: Ibecca77d50bb5c0df59e07e9572069215229f60a