mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 06:52:13 +08:00
fix(unified-storage): unlist the deleted resource's versions (#102588)
This commit is contained in:

committed by
GitHub

parent
d10fdc0f02
commit
fe1a72e41b
@ -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