[#139] test: Add test storage implementation

This aims to reduce the usage of chmod hackery to induce or simulate
OS-related failures.

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-03-21 13:38:44 +03:00 committed by Gitea
parent e843e7f090
commit 341fe1688f
20 changed files with 617 additions and 208 deletions

View file

@ -43,7 +43,7 @@ func (c *cache) openStore(readOnly bool) error {
return err
}
c.db, err = OpenDB(c.path, readOnly)
c.db, err = OpenDB(c.path, readOnly, c.openFile)
if err != nil {
return fmt.Errorf("could not open database: %w", err)
}