Unistore : Ensure Watch works in HA mode (#94120)

* Revert "Revert "Unistore : Ensure Watch works in HA mode." (#94097)"

This reverts commit 7c3fc2f2619a0eb2157ea27e7dfef91996a9de7c.

* make previous_resource_version nullable

* handle nil case
This commit is contained in:
Georges Chaudy
2024-10-07 04:01:53 -04:00
committed by GitHub
parent 3bda6c2c0a
commit 03f55e5288
28 changed files with 483 additions and 699 deletions

View File

@ -104,6 +104,18 @@ func TestUnifiedStorageQueries(t *testing.T) {
},
},
},
sqlResourceHistoryPoll: {
{
Name: "single path",
Data: &sqlResourceHistoryPollRequest{
SQLTemplate: mocks.NewTestingSQLTemplate(),
Resource: "res",
Group: "group",
SinceResourceVersion: 1234,
Response: new(historyPollResponse),
},
},
},
sqlResourceUpdateRV: {
{
@ -143,7 +155,8 @@ func TestUnifiedStorageQueries(t *testing.T) {
Data: &sqlResourceRequest{
SQLTemplate: mocks.NewTestingSQLTemplate(),
WriteEvent: resource.WriteEvent{
Key: &resource.ResourceKey{},
Key: &resource.ResourceKey{},
PreviousRV: 1234,
},
},
},