Merge pull request #11529 from n1hility/fix-oldfields

Add deprecated event fields for 1.22+ clients that still expect them
This commit is contained in:
OpenShift Merge Robot
2021-09-13 17:17:28 -04:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,14 @@ class SystemTestCase(APITestCase):
obj = json.loads(line)
# Actor.ID is uppercase for compatibility
self.assertIn("ID", obj["Actor"])
# Verify 1.22+ deprecated variants are present if current originals are
if (obj["Actor"]["ID"]):
self.assertEqual(obj["Actor"]["ID"], obj["id"])
if (obj["Action"]):
self.assertEqual(obj["Action"], obj["status"])
if (obj["Actor"].get("Attributes") and obj["Actor"]["Attributes"].get("image")):
self.assertEqual(obj["Actor"]["Attributes"]["image"], obj["from"])
def test_ping(self):
required_headers = (