fix(unified-storage): unlist the deleted resource's versions (#102588)
This commit is contained in:
@@ -147,9 +147,9 @@ func TestUnifiedStorageQueries(t *testing.T) {
|
||||
sqlResourceHistoryRead: {
|
||||
{
|
||||
Name: "single path",
|
||||
Data: &sqlResourceReadRequest{
|
||||
Data: &sqlResourceHistoryReadRequest{
|
||||
SQLTemplate: mocks.NewTestingSQLTemplate(),
|
||||
Request: &resource.ReadRequest{
|
||||
Request: &historyReadRequest{
|
||||
ResourceVersion: 123,
|
||||
Key: &resource.ResourceKey{
|
||||
Namespace: "ns",
|
||||
@@ -163,6 +163,40 @@ func TestUnifiedStorageQueries(t *testing.T) {
|
||||
},
|
||||
},
|
||||
|
||||
sqlResourceHistoryReadLatestRV: {
|
||||
{
|
||||
Name: "single path",
|
||||
Data: &sqlResourceHistoryReadLatestRVRequest{
|
||||
SQLTemplate: mocks.NewTestingSQLTemplate(),
|
||||
Request: &historyReadLatestRVRequest{
|
||||
Key: &resource.ResourceKey{
|
||||
Namespace: "ns",
|
||||
Group: "gp",
|
||||
Resource: "rs",
|
||||
Name: "nm",
|
||||
},
|
||||
},
|
||||
Response: new(resourceHistoryReadLatestRVResponse),
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "with WatchEvent_DELETED",
|
||||
Data: &sqlResourceHistoryReadLatestRVRequest{
|
||||
SQLTemplate: mocks.NewTestingSQLTemplate(),
|
||||
Request: &historyReadLatestRVRequest{
|
||||
Key: &resource.ResourceKey{
|
||||
Namespace: "ns",
|
||||
Group: "gp",
|
||||
Resource: "rs",
|
||||
Name: "nm",
|
||||
},
|
||||
EventType: resource.WatchEvent_DELETED,
|
||||
},
|
||||
Response: new(resourceHistoryReadLatestRVResponse),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
sqlResourceHistoryUpdateRV: {
|
||||
{
|
||||
Name: "single path",
|
||||
|
||||
Reference in New Issue
Block a user