mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
dedupe: record relative path for cache entries
In a production use case we found that the actual rootdir can be moved. Currently, cache entries for dedupe record the full blob path which doesn't work in the move use case. Only for dedupe cache entries, record relative blob paths.
This commit is contained in:
@@ -3,6 +3,7 @@ package storage_test
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/anuvu/zot/errors"
|
||||
@@ -33,7 +34,7 @@ func TestCache(t *testing.T) {
|
||||
b := c.HasBlob("key", "value")
|
||||
So(b, ShouldBeFalse)
|
||||
|
||||
err = c.PutBlob("key", "value")
|
||||
err = c.PutBlob("key", path.Join(dir, "value"))
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
b = c.HasBlob("key", "value")
|
||||
|
||||
Reference in New Issue
Block a user