21 Commits

Author SHA1 Message Date
armando-migliaccio
19f06c67e4 Add pointers to access Neutron test coverage details
Being aware of what the coverage looks like should help
writing more comprehensive tests.

Change-Id: Idd31edb2695d6b2b3475bfd3b2e9eafd6c12ba8e
2015-10-08 12:26:27 -07:00
Assaf Muller
11da3bbe8b Add testing coverage .rst, missing test infrastructure to-dos
Change-Id: I1f3bc57ebc196a1c50b731c68cecb5aad3cda21d
2015-08-10 20:37:23 -04:00
Assaf Muller
e152f93878 TESTING.rst love
Change-Id: I64b569048f8f87ea2fe63d861302b4020d36493d
2015-08-10 12:15:09 -04:00
Henry Gessau
fef79dc7b9 Consistent layout and headings for devref
The lack of convention for heading levels among the independently
written devref documents was starting to make the Table of Contents
look rather messy when rendered in HTML.

This patch does not cover the "Neutron Internals" section since its
layout is reasonably OK for now.

Change-Id: I827c105599f05773bda7e4fc0a941ce04ebd51fa
2015-08-09 21:46:57 -04:00
Assaf Muller
408af3f7da Prepare for full stack CI job
Related-Bug: #1467275

Change-Id: I90f4794f48ae151a888f37df26c087a7fdcd9d31
2015-06-22 11:47:54 -04:00
John Schwarz
2fcbbf3031 Move full-stack logs post-tests
Currently, it's up to the developer who wants to run full-stack on his
machine to make the directory in question (/opt/stack/logs). However,
this also means that the files don't get compressed at the end of a gate
run. Now, each full-stack test will have each own log directory in /tmp.
Once the logs are there, post_test_hook.sh can run 'gzip' on all the log
files before moving them to /opt/stack/logs on its own.

Change-Id: I5c04d0af0b9858722ae0c4baf0ee478ffb078e02
2015-05-28 12:58:40 +03:00
armando-migliaccio
cc904070cc Fix formatting errors in TESTING.rst
There were a few errors that went undetected.

TESTING.rst:266: SEVERE: Title level inconsistent:
TESTING.rst:67: ERROR: Unknown target name: "test".
TESTING.rst:74: ERROR: Unknown target name: "test".

Change-Id: Iad225e95c23b7460d228ba5447f4a361aa68d5dc
2015-04-14 23:09:36 +00:00
Gal Sagie
77df532e10 Additions to TESTING.rst
Small addition on how to run pep8 tests only for latest
patch set.

Change-Id: I07fa2c633d17acd1284ccd726a99a46414100ba3
2015-04-13 14:27:19 +03:00
Maru Newby
3e83a26e66 Enhance TESTING.rst
Add detail about api testing and provide better visual separation
between the different types of testing.

The current testing guidelines are mainly about running tests, and
this change does little to fix that.  The intention is to add detail
about writing tests in subsequent changes.

Change-Id: I39d0439c91e5c6edb1d48d4da310443c99fb6d9e
2015-04-07 16:17:21 +00:00
Maru Newby
1105782e39 Reorganize unit test tree
This change ensures that the structure of the unit test tree matches
that of the code tree to make it obvious where to find tests for a
given module.  A check is added to the pep8 job to protect against
regressions.

The plugin test paths are relocated to neutron/tests/unit/plugins
but are otherwise ignored for now.

Change-Id: If307593259139171be21a71c58e3a34bf148cc7f
Partial-Bug: #1440834
2015-04-06 23:28:31 +00:00
John Schwarz
e0ea5edc12 Add full-stack tests framework
This patch introduces the full-stack tests framework, as specified in
the blueprint. In short, this adds the neutron.tests.fullstack module,
which supports test-managed neutron daemons. Currently only
neutron-server is supported and follow-up patches will support for
multiple agents.

Implements: blueprint integration-tests
Co-Authored-By: Maru Newby <marun@redhat.com>
Change-Id: Iff24fc7cd428488e918c5f06bc7f923095760b07
2015-03-26 20:21:40 +02:00
Maru Newby
30c6f56365 Add script to copy neutron api tests from tempest
This change adds a script to automate the copying of api tests from
tempest in the style of oslo_incubator.  The target path will be
neutron/tests/tempest and no manual modifications should be made to
this path until such time as neutron api test development is frozen in
tempest and development can proceed in the neutron tree.  Until that
occurs, a policy of manual once-daily synchronization is suggested.

The target path includes the name 'tempest' as a clear indication that
this is not part of neutron, and that once development is allowed to
proceed, its contents should be rewritten and removed until there is
nothing left.

So long as the tests exist in both the tempest and neutron trees,
testing effort will be duplicated.  The larger goal is to have the
tests in question removed from tempest as per the qa guidelines [1],
so this should be temporary.

1: https://wiki.openstack.org/wiki/QA/Tempest-test-removal

Change-Id: I3cd55983e610a1d61aae565f88fe5017edba1090
2015-03-06 19:57:27 +00:00
Ihar Hrachyshka
754b99668f devref: consider sphinx warnings as failures
We previously introduced issues in our documentation due to not checking
for sphinx warnings [1], so let's enforce documentation validation.

This commit also fixes minor syntax issues caught by sphinx. Among
those, contribute.rst is now properly attached to ToC.

[1]: I48ab899077458d99eee6f643577d574106c1ca88

Change-Id: I9170883a20137c343f03d8b052399eacab4ae130
2015-02-23 18:48:18 +00:00
Maru Newby
540e4d791f Automate host configuration for functional testing
This change adds a new script, configure_for_func_testing.sh, that
automates configuration of a host to support functional testing.  The
script's functionality is consumed by a refactored version of
gate_hook.sh, and both minimizes runtime and removes the previous
dependency on the devstack-gate repo.

Additionally, the dsvm-functional tox env is no longer dependent on
devstack to deploy neutron's rootwrap configuration system-wide.
Rootwrap configuration is now deployed to the target tox venv on each
tox invocation.

Change-Id: Iaf43be458bdf3c4535f95ee5a3a3b47a744020a0
2015-02-14 05:13:03 +00:00
Maru Newby
930b4e3d7b Replace mention of nose with nose2 in devref
Documentation for the nose test runner was previously included in the
testing section of the developer reference.  Due to nose's lack of
support for the load_tests protocol - required to support
testscenarios-based generative testing - the documentation has been
updated to suggest the load_tests-supporting nose2 instead.

Change-Id: I5beb8619d5045372472021ed7eb19bddd0de5862
2015-01-06 00:46:47 +00:00
Jeremy Stanley
25ef9258a8 Workflow documentation is now in infra-manual
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.

Change-Id: I77aa4152a903a0f1f47de20bb1a006d29f5a1bf2
2014-12-05 03:30:37 +00:00
Miguel Angel Ajo
d37ff165f4 Support pudb as a different post mortem debugger
Post mortem debugger starts pdb at the assert failure place
when OS_POST_MORTEM_DEBUGGER is set and an exception or assert
failure happens.

This patch adds a neutron env variable OS_POST_MORTEM_DEBUGGER
to allow invocation of pudb instead of pdb. pudb module is not
a hard requisite as it will be only imported if you set
OS_POST_MORTEM_DEBUGGER=pudb.

The old OS_POST_MORTEM_DEBUG env variable is removed now.

Change-Id: I5d40913add439cf9c30305bafc98af9f8cd4d12f
2014-11-14 12:30:20 +01:00
Jenkins
4309020f8e Merge "Add a gate-specific tox env for functional tests" 2014-07-19 02:48:16 +00:00
Maru Newby
37086a8f17 Add a gate-specific tox env for functional tests
The functional gate jobs (*-neutron-dsvm-functional) need special
configuration (e.g. OS_SUDO_TESTING, OS_ROOTWRAP_CMD) to run tests.
This patch adds a new gate-specific tox env (tox -e dsvm-functional)
that sets the appropriate values and allows easy duplication of the
results of the upstream job on a host that has successfully run
devstack with neutron enabled.

A new configuration option, OS_FAIL_ON_MISSING_DEPS, is also set by
the dsvm-functional tox env to ensure that dependency failures will
result in failures rather than skips when run in the gate.

Change-Id: Idbfef1ba72ed129a3021509c7969e2685b8a6d09
Partial-bug: #1336172
2014-07-09 06:05:11 +00:00
Ralf Haferkamp
4675b462b6 Fix example for running individual tests
The ':' syntax doesn't seem to work anymore. Additionally fix the "tox" call to
not try to run it from the current working directory. It's usually installed
somewhere in $PATH.

Closes-Bug: #1334134
Change-Id: Ie608cee2ac131941d6642e2560a84db55415654b
2014-07-01 09:06:13 +02:00
Sean M. Collins
72398f1f69 Developer documentation
* Turns TESTING into a rst file, that we include in the developer
  documentation, for instructions on how to run the unit tests.
* Link to a Vagrant project that sets up Neutron inside a VM.
* Adds a section for how to debug with Nose
* Add new section for Neutron Internals
* Neutron L2 Agent documentation - currently only OVS
* Make the Security Group API extension an example of how an API
  extension is implemented

Implements bp developer-documentation

Change-Id: I9b452abc9da3b1a41ae65cff727967de0eab12fe
2014-02-26 11:03:46 -05:00