mirror of
https://github.com/moby/buildkit.git
synced 2026-08-04 23:00:51 +00:00
This allows more flexible control over DB transactions and compaction. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
25 lines
481 B
Go
25 lines
481 B
Go
package bboltcachestorage
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/moby/buildkit/solver"
|
|
"github.com/moby/buildkit/solver/testutil"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestBoltCacheStorage(t *testing.T) {
|
|
testutil.RunCacheStorageTests(t, func() solver.CacheKeyStorage {
|
|
tmpDir := t.TempDir()
|
|
|
|
st, err := NewStore(filepath.Join(tmpDir, "cache.db"))
|
|
require.NoError(t, err)
|
|
t.Cleanup(func() {
|
|
require.NoError(t, st.Close())
|
|
})
|
|
|
|
return st
|
|
})
|
|
}
|