X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fopnfv_tests%2Fopenstack%2Fsnaps%2Fhealth_check.py;h=1b8d053753d234285531c07706f6e667f954262e;hb=185dbcfb6ed774cc2f0478b05041d9e3a4e2f303;hp=c057eb2b05756dc50acbe440d3d297cc8b51bb73;hpb=392cae434cce5dcf5a5e8dedc18b2791e3dd8e94;p=functest.git diff --git a/functest/opnfv_tests/openstack/snaps/health_check.py b/functest/opnfv_tests/openstack/snaps/health_check.py index c057eb2b0..1b8d05375 100644 --- a/functest/opnfv_tests/openstack/snaps/health_check.py +++ b/functest/opnfv_tests/openstack/snaps/health_check.py @@ -1,4 +1,5 @@ -# Copyright (c) 2015 All rights reserved +# Copyright (c) 2017 Cable Television Laboratories, Inc. and others. +# # This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at @@ -7,9 +8,8 @@ import unittest -from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \ - SnapsTestRunner -from functest.utils.constants import CONST +from functest.opnfv_tests.openstack.snaps.snaps_test_runner import ( + SnapsTestRunner) from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase from snaps.openstack.tests.create_instance_tests import SimpleHealthCheck @@ -23,18 +23,22 @@ class HealthCheck(SnapsTestRunner): """ def __init__(self, **kwargs): if "case_name" not in kwargs: - kwargs["case_name"] = "snaps_health_check" + kwargs["case_name"] = "snaps_images_cirros" super(HealthCheck, self).__init__(**kwargs) self.suite = unittest.TestSuite() - image_custom_config = None - if hasattr(CONST, 'snaps_health_check'): - image_custom_config = CONST.__getattribute__('snaps_health_check') + def run(self, **kwargs): + """ + Builds the test suite then calls super.run() + :param kwargs: the arguments to pass on + :return: + """ self.suite.addTest( OSIntegrationTestCase.parameterize( SimpleHealthCheck, os_creds=self.os_creds, ext_net_name=self.ext_net_name, use_keystone=self.use_keystone, flavor_metadata=self.flavor_metadata, - image_metadata=image_custom_config)) + image_metadata=self.image_metadata)) + return super(self.__class__, self).run()