Commit Graph

59 Commits

Author SHA1 Message Date
manchandavishal 33b031c953 [cleanup] Remove unused file refernce from .gitignore file
This patch removes references of old files from the
.gitignore file which are no longer used and also
update ghostdriver.log-> geckodriver.log.

Change-Id: I32852b8c14254f7c06425c3098e4f7a5b3b7312b
2020-12-08 08:57:46 +00:00
Jim Rollenhagen 1202faa709 Fix coverage job
`coverage run pytest` runs coverage against the tests in a file called
"pytest", whereas `coverage run -m pytest` uses pytest as the test
runner, which is what we really want here.

To avoid duplicated maitenance of pytest arguments,
unit_tests.sh is updated to handle the coverage run.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I106cb5227ca8c4f0a6f9d81c37e745a6f304de45
2020-10-05 15:32:06 +09: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
elajkat 571eb23c79 Tell reno to ignore the kilo branch
When reno 3.x runs under setuptools, it scans all of the branches it can
find, including any that look like they're closed and have an -eol tag.

This patch is a copy of one similar in cinder repo:
https://review.opendev.org/707495

Change-Id: I50a50f75a1e70ccc183f598099f0e2f0fff8985a
2020-03-23 13:18:58 +00:00
Akihiro Motoki 4ef9ba94c0 Avoid duplicated maintenance of integration test config
Configurations of the integration tests are maintained both
in horizon.conf and in-code configuration. It is redundant.

Configurations of the integration tests are defined by oslo.config.
We can use default values from them and generate a sample config file
using oslo-config-generator.

This commit drops horizon.conf and generates the sample config.
We no longer have horizon.conf, so the logic to load the config files
is updated accordingly.

Also makes the usage of single and double quotes in config.py consistent.

Change-Id: Id16c9fd4114316ade63c74097e486623d0c5be9f
2020-01-10 00:55:43 +09:00
Ivan Kolodyazhny 770afab1bf Remove nose references from Horizon
Commit I7fb2fd7dd40f301ea822154b9809a9a07610c507 changed test runner to
not use nose. So it's safe to remove all references now.

Change-Id: I8856e4e91b25f059645eb5e0356d207f6fc119f2
2018-09-22 20:11:30 +03:00
zhubx007 db15eef58d Add package-lock.json which generate by npm
After running tox, generate the package-lock.json
file by npm command.
So that, add it into .gitignore file.

Change-Id: I612a5225963007896b5c18d6cec535d0e09d934a
2018-08-08 17:55:21 +08:00
Adrian Turjak 0ca736e5da Create new wsgi.py file and deprecate old file
Django 1.4 stopped creating django.wsgi files and the common
practice now for a while has been a wsgi.py since it is actually
python code, and should actually be importable.

Right now someone has to copy and rename the existing file if they
want to use it with a server like gunicorn.

This patch adds a new file in location that is importable via python
and adds a deprecation log to the old one.

This also updates the wsgi generation commands to instead  create
'horizon_wsgi.py' and have the apache conf generation also use that
or the default wsgi file.

Change-Id: I0f8bd16c8973ad23bcd8f73b54584dc69e5aed0c
Closes-Bug: #1763204
2018-05-15 01:41:01 +00:00
Ivan Kolodyazhny 235c60c8dc Remove testr support
testr support was introduced in
I0bdef31e23593ca36fdefa4cdd8a7d5059fbcdc6 and is not maintained. Also
it was broken one year ago with 6529cd1eb8
patch.

Change-Id: I234742176ce33b6ef7695c88f7d7a613525f8d72
2017-11-15 23:44:41 +02:00
Rob Cresswell 6529cd1eb8 Remove run_tests.sh
Change-Id: I9892b6c07c6392e534aad0391722727c7ca3e879
2017-08-15 10:38:19 +00:00
Akihiro Motoki 65951cf1b9 Generate unit test HTML reports
Currently we need to check unit test results by opening console.html.
HTML reports would be nice for this purpose.

Note that the infra CI post script stores '*nose_results.html',
so the filenames need to end with 'nose_results.html'.

--with-html-output option is not available for python 3. I am not sure
the reason at now, but I think it is worth enabling it for python 2.

Change-Id: Icea8d21d0cf93f99f577e6609e9ced166a55609a
2017-05-04 07:23:40 +00:00
Rob Cresswell 36d1d1ac68 Refactor tox & update docs
- 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
2016-11-30 20:38:59 +00:00
Akihiro Motoki 215ccba9ec doc: Do not generate no source code reference
horizon devref has both explicit autodoc directives and
automatically generated source references.
This causes a lot of 'WARNING: duplicate object description'.

I think that we don't need source code references for most modules
and it is better to have explicit API references of modules
for which we need references. Thus this commit removes the logic
to generate source references.

This contributes a lot to reduce the number of sphinx warnings.
Also reduces the required time of documentation build :-)

Partial-Bug: #1411719
Partial-Bug: #1486222
Change-Id: Iba2bf3723cad159f4cfd1fff47e8114d9867e040
2016-09-24 20:44:48 +09:00
qiaomin b814a0aeb3 Add Apple OS X ".DS_Store" to ".gitignore" file
Change-Id: Ia025993f10bfac4ac96c86a18e871192d1b955cd
2016-08-08 06:05:39 +00:00
jing.liuqing 034f1818b6 Ignore the test_report of integration test in .gitignore
Change-Id: I751838f745bb0f91b42ea53eff31f9e0fcf79d76
2016-07-28 16:56:31 +08:00
jing.liuqing ee16100db9 Update .gitignore for JetBrains(PyCharm) users
We ignore .idea directory for JetBrains(PyCharm) users
See: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore

Change-Id: Ida6f170d389d9566638f39a411c3b252165a310b
2016-06-12 21:24:09 +08:00
Matt Borland bf7c5908fb Output JS Karma test coverage reports to ./cover/
Per CTI direction (see bug filing), this patch moves the JS Karma test coverage
reports to ./cover/ so they may be collected in the gate for archiving.

The two runs each have their own directory so they don't overlap/conflict.

Change-Id: I0b1536c115a516f4b6ab80b5ebab5337b308c210
Closes-Bug: 1588389
2016-06-02 14:35:39 +00:00
Rob Cresswell 2843ce3c0a Enable Angular Launch Instance by default
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
2016-03-03 17:40:35 +00:00
Thai Tran 142b302745 Ignore local folder
We currently ignore example files in dashboard/local. We should just ignore
the entire folder and exempt those files. This would allow developers and
operators to add content to the folder without accidentally committing it
upstream.

Change-Id: I2fe40af96ee62d85dd01e279485ce7f392a50a03
Closes-Bug: #1546218
2016-02-16 09:28:29 -08:00
Richard Jones af505dacd1 Add configuration mechanism to turn off browser maximisation
Having the window maximise during a test run makes it difficult
to work with other windows, especially on a single-monitor
computer. This patch removes the maximisation call.

This patch also adds a "local" configuration mechanism to allow
developers to have local configuration of the integration test
environment without it affecting the git repository.

Change-Id: I8a7acbe40deaec5cca904526e3f3c8bc3357744c
Closes-Bug: 1540719
2016-02-11 07:05:22 +11:00
Federico Ressi 34c1c533cc Can't ignore required package script.
Module 'horizon/openstack_dashboard/settings.py' imports package
'openstack_dashboard.local.enabled', therfore package script
'openstack_dashboard/local/enabled/__init__.py' can't be marked
to be ignore by git.

Change-Id: I8b495781d4cfce11ebaaad2c23e84787dc140fb5
Closes-Bug: #1530338
2016-01-07 22:27:18 +00:00
Jenkins bd189bc2e9 Merge "Make integration tests pluggable" 2015-12-31 01:24:29 +00:00
Matthias Runge ab9e5d94af Add testr support
How to test:
testr init
testr run

Change-Id: I0bdef31e23593ca36fdefa4cdd8a7d5059fbcdc6
2015-12-10 09:45:41 +01:00
David Lyle 28e14b7141 Make integration tests pluggable
There are 2 possible setups when running integration tests for
Horizon plugins.

The first setup, which we suggest to be used in gate of *-dashboard
plugins is to get horizon as a dependency of a plugin and then run
integration tests using horizon.conf config file inside plugin
repo. This way plugin augments the location of Horizon built-in Page
Objects with the location of its own Page Objects, contained within
`plugin_page_path` option and the Horizon built-in nav structure with
its own nav structure contained within `plugin_page_structure`. Then
plugin integration tests are run against core Horizon augmented with
just this particular plugin content.

The second setup may be used when we need to run integration tests for
Horizon + several plugins. In other words, content from several
plugins is merged into core Horizon content, then the combined
integration tests from core Horizon and all the involved plugins are
run against the resulting dashboards. To make this possible both
options `plugin_page_path` and `plugin_page_structure` have
MultiStrOpt type. This means that they may be defined several times
and all the specified values will be gathered in a list, which is
iterated when running integration tests. In this setup it's easier to
run the tests from Horizon repo, using horizon.conf file within it.

Keep in mind that `plugin_page_structure` needs to be a strict JSON
string, w/o trailing commas etc.

This patch as well removes leftfovers of sahara integration tests from
Horizon repo, in order for core Horizon integration tests to
pass. Sahara integration tests are moved to the CR
https://review.openstack.org/#/c/253614

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I99718970af78feeafc25dbb3aa9639ea2cf401ad
2015-12-08 07:34:52 +00:00
Richard Jones 861f9c2c4a Enable PhantomJS for running Selenium tests
This patch enables the PhantomJS webdriver for running
the Selenium test suite.

Use it with the --selenium-phantomjs command-line switch
when executing the selenium and integration suite.

Change-Id: I443e6f6d7d1911df500b360f7c22686b417fbeae
Blueprint: enable-phantomjs-selenium
2015-11-25 11:25:51 +11:00
lin-hua-cheng 0ffb6d8045 Add reno for release notes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: I4be108a22d4e67ebfc4483fbf45f9feffbac1e15
2015-11-11 02:38:47 -08:00
Rob Cresswell 248281406e Don't hide Karma coverage reports
This patch updates the file names of the coverage reports so they are
visible by default on most systems. Also updates the .gitignore, so the
new files are not pushed to the Horizon repo.

DocImpact

Closes-Bug: 1508526
Change-Id: I3c1c8f4c88819e2f49b60722ea8cc37bdc711b8c
2015-11-04 10:21:46 +09:00
Serhii Vasheka bc109d33ed Add _save_screenshot functionality to helpers.
Having screenshot of failed test might increase speed of
understanding the failure reason.

partially-implements blueprint: selenium-integration-testing

Depends-On: I0fd89ede7a3d04ce9b4bd4c8fba0789770048d40
Change-Id: Ibc4a6235423736e5938fb348bbe83211917b08d1
2015-09-16 12:40:38 +03:00
Matt Borland 241c2cf432 Get unit tests working with Karma
Establish features for running Karma tests.  Separate karma configurations
are used due to current overlap of template file structure.

You can run the karma tests via:
  ./run_tests.sh --karma

The Karma framework allows for many features like unit test coverage and
provides a common configuration for different test runners.

Change-Id: I79680ef6369383c148da68e6677945886a48df81
Implements: blueprint karma
2015-06-01 14:14:58 +00:00
Matt Riedemann 276cdd8060 Ignore all egg type artifacts
An .eggs/ directory was being created when running
tox -r -e jshint, we should be ignoring egg artifacts
so be more aggressive in what's ignored for eggs.

The old horizon.egg-info entry is covered by the new
ignore entry.

Change-Id: I54de1f603c1c9867fd3ca3e676b5a3fe36d2ab3e
2015-05-27 04:03:48 +00:00
Yves-Gwenael Bourhis 9610f0bed0 Added a migrate_settings command
This command allows to easily save a diff between local_settings.py and
local_settings.py.example to reapply the change when local_settings.py.example
changes (per branch switch or updates).

implements bp settings-migration-script

Change-Id: I2668bbf248434a5d437a5fc46ad07c1a1f29b793
2015-02-05 12:24:18 +01:00
Sam Betts 739c6b23dc Add *.lock to .gitignore file
Lock files being left behind by oslo_concurrency were not gitignored so
it was likely they would end up in commits by accident, this patch adds
*.lock to the .gitignore to prevent this.

Change-Id: I06d5eda51e84af0e7afa64315b47a6a651ef41ec
Closes-Bug: 1415576
2015-01-28 17:39:29 +00:00
Akihiro Motoki 06657c6502 Remove compiled message catalogs
A kind of binary files are useless to be maintained in git repo.
I18N team and package distributors have agreed to remove compiled
message catalogs from Horizon git repository.

The instruction on how to compile message catalogs will be
covered by https://review.openstack.org/#/c/126169/
or the installation guide.

DocImpact

Change-Id: I81b05cf79c21d85bed8a6da6df659955e7ac58c5
Closes-Bug: #1196982
2014-10-10 05:31:32 +09:00
Yves-Gwenael Bourhis c2d9a373c1 Created a make_web_conf command.
The current wsgi does not support virtualenvs (in some distributions, the
dependencies may conflict with the distribution's python packages/dependencies
and would require a virtualenv even in production).
Also, making an apache web configuration is not always trivial especialy
with ssl.
This "make_web_conf" command creates a wsgi with automatic virtualenvironment
detection (if there is a virtualenvironment), and creates an apache
(normal or ssl) configuration

TODO(ygbo)::

    - add nginx support to generate nginx configuration files.
    - add gunicorn support.
    - add uwsgi support.

implements bp web-conf-generation-script

Change-Id: I6397ba01df88b540bbdca4bf21ba90be6843022a
2014-04-03 17:34:32 +02:00
Sushil Kumar 5117c74d52 Updates .gitignore
To ignore swap files from getting into repository
currently the implemented ignore is *.swp
however vim adds more swap files if these files exists,
so improving this with *.sw?

Change-Id: I91c799acfe186791061cd91414f606fd7cf08fb7
Closes-Bug: #1255876
2013-11-28 08:53:42 +00:00
Anita Kuno 3b601d7b77 Added openstack_dashboard/local/.secret_key_store to .gitignore.
Change-Id: Ie3a9c1f4f150702f65a8ccd7d46dd5e1c8c19bc8
2013-02-11 17:12:56 +00:00
Akihiro MOTOKI 05cf900492 Initial support of Quantum V2.
Implementes blueprint quantum-horizon and blueprint readd-quantum-support.
This commit also covers blueprint quantum-workflow-integration.

- Added quantum API layer,
- Added network/subnet/port CRUD operations,
- Added 'Network' user panel,
- Added 'Network' system panel,
- Added 'Networking' tab in instance creation workflow.
- Supported launching an instance with specified network(s)

Change-Id: I7ad608e17cb6fb4f0de02721888e96a68cf926e8
2012-08-13 02:54:42 +09:00
Sascha Peilicke 9aa2dda073 Provide utilities to automate secure secret key generation
Implements blueprint automatic-secure-key-generation

Reduce the likeliness that the (commented-out) default key is abused
and document possible options instead.

Also use a non-empty SECRET_KEY for development / testing environments.

A later patch would make it a hard error if no SECRET_KEY is defined
(i.e. Django defaults to an empty string which is anything but secure).
Unfortunately, I can't do it now as the devstack integration test would
fail (they don't set a SECRET_KEY either) currently. So, when this
blueprint is accepted, I would submit a fix to devstack and afterwards
add the error message to warn the user about insecure defaults.

Addressed PEP-8 issues

Change-Id: Ifdab8e6b6fb3025fde7a2b92beb046ec9c5cba7f
2012-07-03 10:18:56 +02:00
Clark Boylan f1a8e0c54f Move docs to doc.
To better facilitate the building and publishing of sphinx
documentation by Jenkins we are moving all openstack projects with
sphinx documentation to a common doc tree structure. Documentation
goes in project/doc and build results go in project/doc/build.

Change-Id: Ic523a716e4113198b777d6dc3db8bb8a729e7696
2012-06-12 11:41:04 -07:00
John Postlethwait 0074328fbb Updating Horizon to use LESS.
This changes all of the Bootstrap CSS and Horizon
CSS to use LESS. Horizon's specific CSS will be
organized into separate files in another commit,
as it is outside the scope of this BP.

We are also now packing LESS 1.3.0 directly within
Horizon.

Implementation of Blueprint transition-to-lesscss

Change-Id: Ie4be8b28ab3ce04ea21d7d5cd49c2ccb66bd8ade
2012-06-07 14:32:43 -07:00
Ke Wu 59e862e422 Add Swift pseudo-folder support to Horizon.
Implements blueprint swift-folders.

Change-Id: If29ad3cc1fcfb9b7bdb66d915a667f3363d38da0
2012-06-06 13:48:33 -07:00
Monty Taylor c93e7c06fd Add ProjectTestingInterface to horizon.
Horizon is the last project that doesn't have support for the common
Project Testing Interface. This gets horizon up to speed with the
other bits, but shouldn't break any of the existing interfaces.

Change-Id: I464c3b10d9708a0b7b5ffd42c88cd3cf515ef6a7
2012-05-26 14:36:19 -07:00
Gabriel Hurley 2042b89649 Makes setup.py actually list it's dependencies for pip/easy_install.
Change-Id: I9b774f5d64662f67d2a4dd2d1dd4dc59be0f45df
2012-02-29 17:31:12 -08:00
Gabriel Hurley 052aa55d34 Unifies the project packaging into one set of modules.
There are no longer two separate projects living inside the horizon
repository. There is a single project now with a single setup.py,
single README, etc.

The openstack-dashboard/dashboard django project is now named
"openstack_dashboard" and lives as an example project in the
topmost horizon directory.

The "horizon/horizon" directory has been bumped up a level and now
is directly on the path when the root horizon directory is on
your python path.

Javascript media which the horizon module directly relies upon
now ships in the horizon/static dir rather than
openstack-dashboard/dashboard/static.

All the corresponding setup, installation, build, and env scripts
have been updated accordingly.

Implements blueprint unified-packaging.

Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
2012-02-29 00:20:13 -08:00
Andrews Medina bcb4166eb7 Ignoring .venv dir
Change-Id: I468eb603ba5376ada99a90cc565f7906afdfbd64
2012-02-15 01:38:40 -02:00
Gabriel Hurley 64b81acc0a Reworked all the usage implementations into one standard set.
Adds a base Usage data object, datatables, class-based views,
and more consistent templating for all cases.

Bumps environment version to ensure latest novaclient.

Fixes bug 922353.

Change-Id: Ib2042e9393c8deb0e3ec23403da55a6fb8dd39fb
2012-02-02 14:59:26 -08:00
Gabriel Hurley a17570110f Unified horizon and openstack-dashboard environments.
Buildout has been removed entirely, all dev installation is now
done via the single tools/install_venv.py script.

Django's manage.py script has also been updated to a newer
version/convention; this allows for less python path mangling
and makes things cleaner and more explicit. Note that, as such,
it has been moved up a directory level.

Change-Id: I62f9f06ee00568fc91e5ba7e1fd15d22ea849d1f
2012-01-05 13:57:07 -08:00
Gabriel Hurley 1dec092857 Unit tests shouldn't override template rendering.
Removes the fake_render_to_response function that was preventing
templates from being rendered. This required a number of adjustments
to the mocked obejcts in the view tests (which didn't need to be
mocked to begin with). A couple of legitimate problems were
exposed upon rendering the templates which are also now fixed.

Change-Id: I1647dcec01084318be1bb8f6d6ac1f4308992afa
2011-11-21 13:06:00 -08:00
Gabriel Hurley 34e217b357 Added sanity checks and environment versioning to run_tests.sh.
Implements blueprint environment-versioning.

Fixed bug 887885. The script will bail if the seleniumrc or test scripts are missing, preventing the hang, or the possibility of bad environments.

Change-Id: I3cdeb71660c897e8b2adbf81d3794333d1847204
2011-11-09 16:34:30 -08:00
Gabriel Hurley 2532d25c08 Adds selenium and qunit integration into Django test suite.
Implements blueprint frontend-testing.
Implements blueprint javascript-unit-tests.

Adds selenium to buildout script and uses django-nose-selenium to integrate with Django's unit test machinery. Includes proof-of-implementation tests with both selenium and qunit.

Change-Id: Ic7db4994be398c633a78dca7369359602c7d8f57
2011-11-08 16:44:16 -08:00