forked from TrueCloudLab/rclone
cache: update internal tests with chunk path
This commit is contained in:
parent
c5cf0792f2
commit
a64d92bd35
1 changed files with 4 additions and 2 deletions
6
cache/cache_internal_test.go
vendored
6
cache/cache_internal_test.go
vendored
|
@ -541,7 +541,8 @@ func cleanupFs(t *testing.T, f fs.Fs, b *cache.Persistent) {
|
||||||
func newLocalCacheCryptFs(t *testing.T, localRemote, cacheRemote, cryptRemote string, purge bool, cfg map[string]string) (fs.Fs, *cache.Persistent) {
|
func newLocalCacheCryptFs(t *testing.T, localRemote, cacheRemote, cryptRemote string, purge bool, cfg map[string]string) (fs.Fs, *cache.Persistent) {
|
||||||
fstest.Initialise()
|
fstest.Initialise()
|
||||||
dbPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote+".db")
|
dbPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote+".db")
|
||||||
boltDb, err := cache.GetPersistent(dbPath, &cache.Features{PurgeDb: true})
|
chunkPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote)
|
||||||
|
boltDb, err := cache.GetPersistent(dbPath, chunkPath, &cache.Features{PurgeDb: true})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
localExists := false
|
localExists := false
|
||||||
|
@ -627,7 +628,8 @@ func newLocalCacheCryptFs(t *testing.T, localRemote, cacheRemote, cryptRemote st
|
||||||
func newLocalCacheFs(t *testing.T, localRemote, cacheRemote string, cfg map[string]string) (fs.Fs, *cache.Persistent) {
|
func newLocalCacheFs(t *testing.T, localRemote, cacheRemote string, cfg map[string]string) (fs.Fs, *cache.Persistent) {
|
||||||
fstest.Initialise()
|
fstest.Initialise()
|
||||||
dbPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote+".db")
|
dbPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote+".db")
|
||||||
boltDb, err := cache.GetPersistent(dbPath, &cache.Features{PurgeDb: true})
|
chunkPath := filepath.Join(fs.CacheDir, "cache-backend", cacheRemote)
|
||||||
|
boltDb, err := cache.GetPersistent(dbPath, chunkPath, &cache.Features{PurgeDb: true})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
localExists := false
|
localExists := false
|
||||||
|
|
Loading…
Reference in a new issue