Skip to content

Commit 96a28c8

Browse files
committed
Fix missing identifier in delete event
1 parent 53b55af commit 96a28c8

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pkg/apply/destroyer.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ func runPruneEventTransformer(eventChannel chan event.Event) (chan event.Event,
139139
eventChannel <- event.Event{
140140
Type: event.DeleteType,
141141
DeleteEvent: event.DeleteEvent{
142-
Type: event.DeleteEventResourceUpdate,
143-
Operation: transformPruneOperation(msg.PruneEvent.Operation),
144-
Object: msg.PruneEvent.Object,
142+
Type: event.DeleteEventResourceUpdate,
143+
Operation: transformPruneOperation(msg.PruneEvent.Operation),
144+
Object: msg.PruneEvent.Object,
145+
Identifier: msg.PruneEvent.Identifier,
145146
},
146147
}
147148
}

test/e2e/crd_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ func crdTest(_ client.Client, inventoryName, namespaceName string) {
103103
deleteEvent: &expDeleteEvent{
104104
deleteEventType: event.DeleteEventResourceUpdate,
105105
operation: event.Deleted,
106-
// TODO(mortent): The identifier isn't populated in the Delete
107-
// events. This should be fixed.
108-
// identifier: object.UnstructuredToObjMeta(manifestToUnstructured(crd)),
109-
error: nil,
106+
identifier: object.UnstructuredToObjMeta(manifestToUnstructured(crd)),
107+
error: nil,
110108
},
111109
},
112110
}, destroyerEvents)

0 commit comments

Comments
 (0)