File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
test/apiv2/python/rest_api Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ func ConvertToEntitiesEvent(e libpodEvents.Event) *Event {
60
60
attributes ["name" ] = e .Name
61
61
attributes ["containerExitCode" ] = strconv .Itoa (e .ContainerExitCode )
62
62
return & Event {dockerEvents.Message {
63
+ // Compatibility with clients that still look for deprecated API elements
64
+ Status : e .Status .String (),
65
+ ID : e .ID ,
66
+ From : e .Image ,
63
67
Type : e .Type .String (),
64
68
Action : e .Status .String (),
65
69
Actor : dockerEvents.Actor {
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ def test_events(self):
29
29
obj = json .loads (line )
30
30
# Actor.ID is uppercase for compatibility
31
31
self .assertIn ("ID" , obj ["Actor" ])
32
+ # Verify 1.22+ deprecated variants are present if current originals are
33
+ if (obj ["Actor" ]["ID" ]):
34
+ self .assertEqual (obj ["Actor" ]["ID" ], obj ["id" ])
35
+ if (obj ["Action" ]):
36
+ self .assertEqual (obj ["Action" ], obj ["status" ])
37
+ if (obj ["Actor" ].get ("Attributes" ) and obj ["Actor" ]["Attributes" ].get ("image" )):
38
+ self .assertEqual (obj ["Actor" ]["Attributes" ]["image" ], obj ["from" ])
39
+
32
40
33
41
def test_ping (self ):
34
42
required_headers = (
You can’t perform that action at this time.
0 commit comments