ledgertest

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ledgertest mocks the ledger dir for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	DummyTime time.Time // arbitrary but consistent timestamp
	Root      afero.Fs
}

func NewFS

func NewFS(t *testing.T) *FS

NewFS creates an in-memory file system resembling the ledger dir.

func (*FS) AddFakeFile

func (f *FS) AddFakeFile(t *testing.T, name string)

AddFakeFile adds a file sized one byte to the fake ledger dir.

func (*FS) GetLedgerDir

func (f *FS) GetLedgerDir(t *testing.T) fs.FS

GetLedgerDir returns the ledger dir as a standard library fs.FS.

Jump to

Keyboard shortcuts

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