UniStore: Add folder to the SQL backend (#95671)

* Add folder to the SQL backend

* remove unused key

* fix tests

* Return folders from watch
This commit is contained in:
Georges Chaudy
2024-11-05 10:37:23 +01:00
committed by GitHub
parent 7e34c015ee
commit f075662696
43 changed files with 235 additions and 72 deletions
+11 -3
View File
@@ -43,6 +43,7 @@ func TestUnifiedStorageQueries(t *testing.T) {
Type: resource.WatchEvent_ADDED,
PreviousRV: 123,
},
Folder: "fldr",
},
},
},
@@ -59,6 +60,7 @@ func TestUnifiedStorageQueries(t *testing.T) {
Name: "name",
},
},
Folder: "fldr",
},
},
},
@@ -75,7 +77,7 @@ func TestUnifiedStorageQueries(t *testing.T) {
Name: "name",
},
},
readResponse: new(readResponse),
Response: NewReadResponse(),
},
},
},
@@ -143,9 +145,14 @@ func TestUnifiedStorageQueries(t *testing.T) {
SQLTemplate: mocks.NewTestingSQLTemplate(),
Request: &resource.ReadRequest{
ResourceVersion: 123,
Key: &resource.ResourceKey{},
Key: &resource.ResourceKey{
Namespace: "ns",
Group: "gp",
Resource: "rs",
Name: "nm",
},
},
readResponse: new(readResponse),
Response: NewReadResponse(),
},
},
},
@@ -173,6 +180,7 @@ func TestUnifiedStorageQueries(t *testing.T) {
},
PreviousRV: 1234,
},
Folder: "fldr",
},
},
},