2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-11 13:52:31 +00:00
restic/internal/backend/mem/mem_backend_test.go

28 lines
566 B
Go
Raw Normal View History

2016-01-23 18:19:26 +00:00
package mem_test
import (
2017-05-01 20:56:05 +00:00
"testing"
2016-08-31 20:51:35 +00:00
2017-07-23 12:21:03 +00:00
"github.com/restic/restic/internal/backend/mem"
"github.com/restic/restic/internal/backend/test"
)
func newTestSuite() *test.Suite[struct{}] {
return &test.Suite[struct{}]{
2017-05-01 20:56:05 +00:00
// NewConfig returns a config for a new temporary backend that will be used in tests.
NewConfig: func() (*struct{}, error) {
return &struct{}{}, nil
2017-05-01 20:56:05 +00:00
},
Factory: mem.NewFactory(),
}
2017-05-13 19:47:01 +00:00
}
func TestSuiteBackendMem(t *testing.T) {
newTestSuite().RunTests(t)
}
2017-05-13 19:47:01 +00:00
func BenchmarkSuiteBackendMem(t *testing.B) {
newTestSuite().RunBenchmarks(t)
}