Documentation
¶
Overview ¶
Mock is a set of simulated database and bucket functions for unit testing.
Index ¶
- Constants
- Variables
- func Bucket1() string
- func Bucket2() string
- func CreateItem(bucket, file string, db *bolt.DB) error
- func Export1() string
- func Item1() string
- func Name() (string, error)
- func Open() (*bolt.DB, error)
- func Read(name string) (sum [32]byte, err error)
- func RootDir() string
- func TestOpen() error
- func TestRemove() error
Constants ¶
View Source
const ( PrivateFile fs.FileMode = 0o600 PrivateDir fs.FileMode = 0o700 SevenZip = "test/randomfiles.7z" )
Variables ¶
View Source
var ( ErrBucket = errors.New("bucket already exists") ErrCreate = errors.New("create bucket") )
Functions ¶
func CreateItem ¶
CreateItem adds the bucket and the named file to the database.
func TestOpen ¶
func TestOpen() error
TestOpen creates and opens the mock database, the test 1 bucket and adds the source 1 file. The mock database is closed after the update. Note: If this test fails under Windows, try running `go test ./...` after closing VS Code. https://github.com/electron-userland/electron-builder/issues/3666
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.