Skip to content

Commit 45b4ade

Browse files
fix: remove InventoryID from AdvisoryUpdateEvent
1 parent 1c16d3d commit 45b4ade

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

base/mqueue/advisory_update_event.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
type AdvisoryUpdateEvent struct {
1313
RhAccountID int `json:"rh_account_id"`
1414
WorkspaceID *uuid.UUID `json:"workspace_id"`
15-
InventoryID string `json:"inventory_id"`
1615
AdvisoryIDs []int64 `json:"advisory_ids"`
1716
ProducedAt *types.Rfc3339Timestamp `json:"produced_at"`
1817
}

base/mqueue/advisory_update_event_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ func TestAdvisoryUpdateEventMarshal(t *testing.T) {
1717
event := AdvisoryUpdateEvent{
1818
RhAccountID: 1,
1919
WorkspaceID: &workspaceID,
20-
InventoryID: "00000000-0000-0000-0000-000000000001",
2120
AdvisoryIDs: []int64{101, 202, 303},
2221
ProducedAt: &now,
2322
}
@@ -30,7 +29,6 @@ func TestAdvisoryUpdateEventMarshal(t *testing.T) {
3029
assert.NoError(t, err)
3130
assert.Equal(t, event.RhAccountID, parsed.RhAccountID)
3231
assert.Equal(t, *event.WorkspaceID, *parsed.WorkspaceID)
33-
assert.Equal(t, event.InventoryID, parsed.InventoryID)
3432
assert.Equal(t, event.AdvisoryIDs, parsed.AdvisoryIDs)
3533
assert.NotNil(t, parsed.ProducedAt)
3634
}
@@ -44,14 +42,12 @@ func TestAdvisoryUpdateEventsWriteEvents(t *testing.T) {
4442
{
4543
RhAccountID: 1,
4644
WorkspaceID: &workspaceID,
47-
InventoryID: "00000000-0000-0000-0000-000000000001",
4845
AdvisoryIDs: []int64{100, 200},
4946
ProducedAt: &now,
5047
},
5148
{
5249
RhAccountID: 2,
5350
WorkspaceID: &workspaceID,
54-
InventoryID: "00000000-0000-0000-0000-000000000002",
5551
AdvisoryIDs: []int64{300},
5652
ProducedAt: &now,
5753
},
@@ -68,7 +64,6 @@ func TestAdvisoryUpdateEventsWriteEvents(t *testing.T) {
6864
assert.NoError(t, err)
6965
assert.Equal(t, events[0].RhAccountID, firstEvent.RhAccountID)
7066
assert.Equal(t, *events[0].WorkspaceID, *firstEvent.WorkspaceID)
71-
assert.Equal(t, events[0].InventoryID, firstEvent.InventoryID)
7267
assert.Equal(t, events[0].AdvisoryIDs, firstEvent.AdvisoryIDs)
7368
assert.NotNil(t, firstEvent.ProducedAt)
7469

@@ -77,7 +72,6 @@ func TestAdvisoryUpdateEventsWriteEvents(t *testing.T) {
7772
assert.NoError(t, err)
7873
assert.Equal(t, events[1].RhAccountID, secondEvent.RhAccountID)
7974
assert.Equal(t, *events[1].WorkspaceID, *secondEvent.WorkspaceID)
80-
assert.Equal(t, events[1].InventoryID, secondEvent.InventoryID)
8175
assert.Equal(t, events[1].AdvisoryIDs, secondEvent.AdvisoryIDs)
8276
assert.NotNil(t, secondEvent.ProducedAt)
8377
}

0 commit comments

Comments
 (0)