Skip to content

Commit feed87b

Browse files
committed
Fix Redis tests
1 parent a5bb2a9 commit feed87b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/registry-facade/pkg/registry/cache_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ func TestRedisBlobStore_Writer(t *testing.T) {
9191

9292
client, mock := redismock.NewClientMock()
9393
mock.ExpectExists("cnt."+string(dgst), "nfo."+string(dgst)).SetVal(0)
94-
mock.ExpectTxPipeline()
95-
mock.ExpectSetEX("cnt."+string(dgst), string(cnt), 48*time.Hour).SetVal("OK")
96-
mock.ExpectSetEX("nfo."+string(dgst), `{"Digest":"`+string(dgst)+`","Size":11,"CreatedAt":1,"UpdatedAt":1,"Labels":{"foo":"bar"}}`, 48*time.Hour).SetVal("OK")
97-
mock.ExpectTxPipelineExec()
94+
mock.ExpectMSet(
95+
"cnt."+string(dgst), string(cnt),
96+
"nfo."+string(dgst), `{"Digest":"`+string(dgst)+`","Size":11,"CreatedAt":1,"UpdatedAt":1,"Labels":{"foo":"bar"}}`,
97+
).SetVal("OK")
9898

9999
store := &RedisBlobStore{Client: client}
100100
w, err := store.Writer(context.Background(), content.WithDescriptor(ociv1.Descriptor{

0 commit comments

Comments
 (0)