new test decorator to skip test if specific ext enabled

Bug #1487555 reported by alex kang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Won't Fix
Undecided
alex kang

Bug Description

In some deployments enabled features are required to turn-off some of their functions.
For example on provisioning a subnet, we can specify allocation_pools, dns_nameservers and host_routes, ..., etc. In this propose we would like to skip tests testing host_routes if nsxv-router-type extension is enabled.

Propose to add skip_if_ext_enabled() to test.py and TestSkipIfExtEnabledDecorator to tests/test_decorators.py.

example usage of this decorator:

@test.skip_if_ext_enabled(extension='nsxv-router-type', service='network')

alex kang (akang)
Changed in tempest:
assignee: nobody → alex kang (akang)
description: updated
alex kang (akang)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/215819

Changed in tempest:
status: New → In Progress
Revision history for this message
Jordan Pittier (jordan-pittier) wrote :

Instead of adding a new decorator, could you just decorate the existing tests with "@testtools.skipIf(is_extension_enabled(...))" ?

Revision history for this message
alex kang (akang) wrote :

I think it is better to view from Tempest test perspective, not from the testtools which is the parent class -- should focus on test logic not how testtools can do which should be provided from the viewpoint of Tempest.test.

2nd semantically speaking it is more straight forward to say skip this test if:
   service='network' and extension="nsxv-router-type"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Alex Kang (<email address hidden>) on branch: master
Review: https://review.openstack.org/215819

Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

This seems that we have gotten agreement with using @testtools.skipIf(is_extension_enabled(...)) instead on the review.
So it is not necessary to keep this report now.

Changed in tempest:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.