Merge "Fix callback_type for validation_json.py"

This commit is contained in:
Zuul 2021-05-18 01:48:48 +00:00 committed by Gerrit Code Review
commit 7dc3bacd55
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ DOCUMENTATION = '''
description: description:
- This callback converts all events into a JSON file - This callback converts all events into a JSON file
stored in /var/log/validations stored in /var/log/validations
type: agregate type: aggregate
requirements: None requirements: None
''' '''
@ -59,7 +59,7 @@ def secondsToStr(t):
class CallbackModule(CallbackBase): class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0 CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'agregate' CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'validation_json' CALLBACK_NAME = 'validation_json'
CALLBACK_NEEDS_WHITELIST = True CALLBACK_NEEDS_WHITELIST = True

View File

@ -81,7 +81,7 @@ class TestValidationJson(base.TestCase):
self.assertIn('CALLBACK_TYPE', dir(callback)) self.assertIn('CALLBACK_TYPE', dir(callback))
self.assertEqual(callback.CALLBACK_NAME, 'validation_json') self.assertEqual(callback.CALLBACK_NAME, 'validation_json')
self.assertIsInstance(callback.CALLBACK_VERSION, float) self.assertIsInstance(callback.CALLBACK_VERSION, float)
self.assertEqual(callback.CALLBACK_TYPE, 'agregate') self.assertEqual(callback.CALLBACK_TYPE, 'aggregate')
""" """
Additionally, the 'validation_json' callback performs several Additionally, the 'validation_json' callback performs several
other operations during instantiation. other operations during instantiation.