1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-09 19:29:56 +00:00

Keep track of events for SQL cache watches (#661)

* Keep track of past events

* Clarify RV acronym

* Fix comment typo

* Rename listEvents variables

* Improve filter readability

* Move defer
This commit is contained in:
Tom Lebreux
2025-06-05 16:40:19 -06:00
committed by GitHub
parent b0aa90cd22
commit b695567794
10 changed files with 377 additions and 39 deletions

View File

@@ -43,6 +43,7 @@ func TestNewInformer(t *testing.T) {
// is tested in depth in its own package.
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
dbClient.EXPECT().WithTransaction(gomock.Any(), true, gomock.Any()).Return(nil).Do(
func(ctx context.Context, shouldEncrypt bool, f db.WithTransactionFunction) {
err := f(txClient)
@@ -154,6 +155,7 @@ func TestNewInformer(t *testing.T) {
// is tested in depth in its own package.
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
dbClient.EXPECT().WithTransaction(gomock.Any(), true, gomock.Any()).Return(nil).Do(
func(ctx context.Context, shouldEncrypt bool, f db.WithTransactionFunction) {
err := f(txClient)
@@ -214,6 +216,7 @@ func TestNewInformer(t *testing.T) {
// is tested in depth in its own package.
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
txClient.EXPECT().Exec(gomock.Any()).Return(nil, nil)
dbClient.EXPECT().WithTransaction(gomock.Any(), true, gomock.Any()).Return(nil).Do(
func(ctx context.Context, shouldEncrypt bool, f db.WithTransactionFunction) {
err := f(txClient)