mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Update "evt" field to be logged as a string type.
Testing: - Unit tests - Verified git trace log has "evt": "2" (vs "evt": 2 previously) Bug: https://crbug.com/gerrit/13966 Change-Id: I2e0c98dda0cccdd5cb6328105c11b93cd42676eb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/294123 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Ian Kasprzak <iankaz@google.com>
This commit is contained in:
parent
e5670c8812
commit
febe73ff16
@ -92,7 +92,7 @@ class EventLog(object):
|
|||||||
def _AddVersionEvent(self):
|
def _AddVersionEvent(self):
|
||||||
"""Adds a 'version' event at the beginning of current log."""
|
"""Adds a 'version' event at the beginning of current log."""
|
||||||
version_event = self._CreateEventDict('version')
|
version_event = self._CreateEventDict('version')
|
||||||
version_event['evt'] = 2
|
version_event['evt'] = "2"
|
||||||
version_event['exe'] = RepoSourceVersion()
|
version_event['exe'] = RepoSourceVersion()
|
||||||
self._log.insert(0, version_event)
|
self._log.insert(0, version_event)
|
||||||
|
|
||||||
|
@ -95,6 +95,8 @@ class EventLogTestCase(unittest.TestCase):
|
|||||||
# Check for 'version' event specific fields.
|
# Check for 'version' event specific fields.
|
||||||
self.assertIn('evt', version_event)
|
self.assertIn('evt', version_event)
|
||||||
self.assertIn('exe', version_event)
|
self.assertIn('exe', version_event)
|
||||||
|
# Verify "evt" version field is a string.
|
||||||
|
self.assertIsInstance(version_event['evt'], str)
|
||||||
|
|
||||||
def test_start_event(self):
|
def test_start_event(self):
|
||||||
"""Test and validate 'start' event data is valid.
|
"""Test and validate 'start' event data is valid.
|
||||||
|
Loading…
Reference in New Issue
Block a user