Skip to content

Commit

Permalink
Fix Redis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf authored and roboquat committed May 10, 2022
1 parent 632fae8 commit 484a0b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/registry-facade/pkg/registry/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ func TestRedisBlobStore_Writer(t *testing.T) {

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

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

0 comments on commit 484a0b8

Please sign in to comment.