Skip to content

Commit

Permalink
Changes to skip ceilometer test if mx_gw_test is not enabled
Browse files Browse the repository at this point in the history
Change-Id: I39de19d5b443d9ae8187bc41c84525377c682fc1
(cherry picked from commit eab23c0)
  • Loading branch information
Senthilnathan Murugappan committed May 8, 2017
1 parent 354bc35 commit a21ffe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/ceilometer_tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def setup_common_objects(self, inputs , connections):
assert self.vm1_fixture.verify_on_setup()

# Adding further projects to floating IP.
if not getattr(self.public_vn_obj, 'fip_fixture', None):
return
self.logger.info('Adding project %s to FIP pool %s' %
(self.inputs.project_name, fip_pool_name))
project_obj = self.public_vn_obj.fip_fixture.assoc_project\
Expand Down
6 changes: 6 additions & 0 deletions scripts/ceilometer_tests/test_ceilometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ def test_sample_floating_ip_transmit_packets(self):
Verifying ceilometer sample - ip.floating.transmit.bytes
Verifying ceilometer sample - ip.floating.receive.bytes"""

if os.environ.get('MX_GW_TEST', 0) != '1':
self.logger.info(
"Skipping Test. Env variable MX_GW_TEST is not set. Skipping the test")
raise self.skipTest(
"Skipping Test. Env variable MX_GW_TEST is not set. Skipping the test")

self.logger.info('Sleeping for 1 mins for sample to be collected...')
time.sleep(60)
self.logger.info('Starting verification...')
Expand Down

0 comments on commit a21ffe9

Please sign in to comment.