Add test for FS store driver
This commit is contained in:
parent
934270bd7a
commit
c1049eb48e
|
@ -6,8 +6,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
func TestStore(t *testing.T) {
|
||||
drv, _ := NewMemStore()
|
||||
func testStore_helper(t *testing.T, drv StoreDriver) {
|
||||
store := NewStore(drv)
|
||||
|
||||
v1 := "0.1.2"
|
||||
|
@ -77,6 +76,16 @@ func TestStore(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestStore_Mem(t *testing.T) {
|
||||
drv, _ := NewMemStore()
|
||||
testStore_helper(t, drv)
|
||||
}
|
||||
|
||||
func TestStore_FS(t *testing.T) {
|
||||
drv, _ := NewFSStore(t.TempDir())
|
||||
testStore_helper(t, drv)
|
||||
}
|
||||
|
||||
func benchCreate_helper(b *testing.B, drv StoreDriver) {
|
||||
store := NewStore(drv)
|
||||
|
||||
|
|
Loading…
Reference in New Issue