fix tests and double namespacing depending on backend

This commit is contained in:
bel
2020-04-08 04:00:03 +00:00
parent e5ba896fd4
commit 963e302cb4
4 changed files with 9 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ package storage
import (
"os"
"path"
"strings"
"time"
cache "github.com/patrickmn/go-cache"
@@ -34,7 +35,7 @@ func (c *Cache) List(ns []string, limits ...string) ([]string, error) {
keys := []string{}
for k := range m {
if k >= limits[0] && k <= limits[1] {
keys = append(keys, k)
keys = append(keys, strings.TrimPrefix(k, namespace+"/"))
}
}
return keys, nil