mock

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivateFile fs.FileMode = 0600
	PrivateDir  fs.FileMode = 0700

	CSV1     = "../test/export-bucket1.csv"
	Test1    = "../test/bucket1"
	Test2    = "../test/bucket2"
	SevenZip = "../test/randomfiles.7z"
	Source1  = Test1 + "/0vlLaUEvzAWP"
)

Variables

View Source
var (
	ErrBucket = errors.New("bucket already exists")
	ErrCreate = errors.New("create bucket")
)

Functions

func Bucket1

func Bucket1() string

Bucket1 returns the absolute path of bucket test 1.

func Bucket2 added in v0.0.9

func Bucket2() string

Bucket2 returns the absolute path of bucket test 2.

func CreateItem added in v0.0.8

func CreateItem(bucket, file string, db *bolt.DB) error

CreateItem adds the bucket and the named file to the database.

func Export1 added in v0.1.0

func Export1() string

Export1 returns the absolute path of export csv file 1.

func Item1

func Item1() string

Item1 returns the absolute path of test source file 1.

func Name

func Name() (string, error)

Name returns the absolute path of the mock Bolt database.

func Open added in v0.0.9

func Open() (*bolt.DB, error)

Open and return the mock database.

func Read

func Read(name string) (sum [32]byte, err error)

Read the named file and return its SHA256 checksum.

func TestOpen added in v0.0.9

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

func TestRemove added in v0.0.9

func TestRemove() error

TestRemove deletes the mock database.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL