staticupload: don't request empty invalidation (#1870)

If no files have been touched, do not initiate an invalidation.
This commit is contained in:
Otto Bittner 2023-06-05 15:47:33 +02:00 committed by GitHub
parent 06cd750345
commit fa01569cc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -357,6 +357,7 @@ func TestFlush(t *testing.T) {
wantCacheInvalidationErr: true,
},
"waiting for invalidation times out": {
dirtyKeys: []string{"test-key-1"},
invalidationIDs: []string{
"test-invalidation-id-2",
"test-invalidation-id-3",
@ -364,6 +365,9 @@ func TestFlush(t *testing.T) {
cacheInvalidationWaitTimeout: time.Microsecond,
wantCacheInvalidationErr: true,
},
"no invalidations": {
dirtyKeys: []string{},
},
}
for name, tc := range testCases {