func newTestFile(t testing.TB) (f file, cleanup func()) {
	t.Helper()
	fh, err := ioutil.TempFile("", "file-")
	assert.NoError(t, err)
	assert.NoError(t, fh.Close())
	name := fh.Name()
	f, err = createFile(ctx, name, 512, 10)
	assert.NoError(t, err)
	return f, func() {
		f.Close()
		os.Remove(name)
	}
}
newTestFile constructs a temporary file backed by disk.
package files
import (
	"io/ioutil"
	"os"
	"testing"
	"github.com/vivint/rothko/database/files/internal/meta"
	"github.com/vivint/rothko/internal/assert"
)