[openstack-dev] [neutron] Question on functional tests

Ihar Hrachyshka ihrachys at redhat.com
Wed Jan 21 11:18:42 UTC 2015


Unit tests should run successfully in a very limited environment, with 
no sudo, namespaces etc. Some packagers even run unit tests as part of 
their build process in hardened environment (I know Debian does, and 
some teams from Red Hat consider it too, like Neutron).

So if it really needs to interact with outside world like that, please 
implement it in functional test namespace.

On 01/20/2015 09:02 PM, Kevin Benton wrote:
> I don't believe we have any unit tests that create namespaces or veth 
> pairs. This sounds like it belongs with functional tests.
>
> On Tue, Jan 20, 2015 at 10:20 AM, Numan Siddique 
> <numan.siddique at enovance.com <mailto:numan.siddique at enovance.com>> wrote:
>
>     Hello,
>
>     I am working on a bug [1] on neutron vpnaas and submitted the
>     patch here [2].
>
>     The test code to test the fix does the following
>         - creates a namespace
>         - creates a veth pair and add one interface into the namespace
>         - configures the interface with an ip address and
>         - adds a default gateway
>         - and of course tests the code.
>
>     This test code only tests a specific function
>     (OpenSwanProcess._get_nexthop())
>
>     Reviewers of this patch are not clear if this should be part of
>     functional tests or unit tests.
>     Can unit tests create linux namespaces, interfaces etc or it falls
>     under functional tests?
>
>     Please let me know your thoughts on this.
>
>     [1] - https://bugs.launchpad.net/neutron/+bug/1405413
>     [2] - https://review.openstack.org/#/c/145005/5
>
>
>     Regards
>     Numan
>
>
>     __________________________________________________________________________
>     OpenStack Development Mailing List (not for usage questions)
>     Unsubscribe:
>     OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>     <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
>     http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
> -- 
> Kevin Benton
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150121/2ccea563/attachment.html>


More information about the OpenStack-dev mailing list