Example #1
0
 def skip_checks(cls):
     """Class level skip checks. Subclasses verify in here all
     conditions that might prevent the execution of the entire test class.
     Checks implemented here may not make use API calls, and should rely on
     configuration alone.
     In general skip checks that require an API call are discouraged.
     If one is really needed it may be implemented either in the
     resource_setup or at test level.
     """
     identity_version = cls.get_identity_version()
     if 'admin' in cls.credentials and not credentials.is_admin_available(
             identity_version=identity_version):
         msg = "Missing Identity Admin API credentials in configuration."
         raise cls.skipException(msg)
     if 'alt' in cls.credentials and not credentials.is_alt_available(
             identity_version=identity_version):
         msg = "Missing a 2nd set of API credentials in configuration."
         raise cls.skipException(msg)
     if hasattr(cls, 'identity_version'):
         if cls.identity_version == 'v2':
             if not CONF.identity_feature_enabled.api_v2:
                 raise cls.skipException("Identity api v2 is not enabled")
         elif cls.identity_version == 'v3':
             if not CONF.identity_feature_enabled.api_v3:
                 raise cls.skipException("Identity api v3 is not enabled")
Example #2
0
 def skip_checks(cls):
     """Class level skip checks. Subclasses verify in here all
     conditions that might prevent the execution of the entire test class.
     Checks implemented here may not make use API calls, and should rely on
     configuration alone.
     In general skip checks that require an API call are discouraged.
     If one is really needed it may be implemented either in the
     resource_setup or at test level.
     """
     identity_version = cls.get_identity_version()
     if 'admin' in cls.credentials and not credentials.is_admin_available(
             identity_version=identity_version):
         msg = "Missing Identity Admin API credentials in configuration."
         raise cls.skipException(msg)
     if 'alt' in cls.credentials and not credentials.is_alt_available(
             identity_version=identity_version):
         msg = "Missing a 2nd set of API credentials in configuration."
         raise cls.skipException(msg)
     if hasattr(cls, 'identity_version'):
         if cls.identity_version == 'v2':
             if not CONF.identity_feature_enabled.api_v2:
                 raise cls.skipException("Identity api v2 is not enabled")
         elif cls.identity_version == 'v3':
             if not CONF.identity_feature_enabled.api_v3:
                 raise cls.skipException("Identity api v3 is not enabled")
Example #3
0
 def skip_checks(cls):
     """Class level skip checks. Subclasses verify in here all
     conditions that might prevent the execution of the entire test class.
     Checks implemented here may not make use API calls, and should rely on
     configuration alone.
     In general skip checks that require an API call are discouraged.
     If one is really needed it may be implemented either in the
     resource_setup or at test level.
     """
     if 'admin' in cls.credentials and not credentials.is_admin_available():
         msg = "Missing Identity Admin API credentials in configuration."
         raise cls.skipException(msg)
     if 'alt' is cls.credentials and not credentials.is_alt_available():
         msg = "Missing a 2nd set of API credentials in configuration."
         raise cls.skipException(msg)
Example #4
0
 def skip_checks(cls):
     """Class level skip checks. Subclasses verify in here all
     conditions that might prevent the execution of the entire test class.
     Checks implemented here may not make use API calls, and should rely on
     configuration alone.
     In general skip checks that require an API call are discouraged.
     If one is really needed it may be implemented either in the
     resource_setup or at test level.
     """
     if 'admin' in cls.credentials and not credentials.is_admin_available():
         msg = "Missing Identity Admin API credentials in configuration."
         raise cls.skipException(msg)
     if 'alt' is cls.credentials and not credentials.is_alt_available():
         msg = "Missing a 2nd set of API credentials in configuration."
         raise cls.skipException(msg)