Documentation
¶
Overview ¶
Package testbundle writes small, sparse, contract-shaped bundle directories for unit and acceptance tests.
Index ¶
Constants ¶
View Source
const ContractSize = 2*spec.ChunkSize + spec.ChunkSize/2
ContractSize is 1.25 GiB: two full chunks (the second all zero with the default DataAt) and a short third chunk.
Variables ¶
View Source
var ErrOptions = errors.New("testbundle: invalid options")
ErrOptions reports unusable options.
Functions ¶
Types ¶
type Options ¶
type Options struct {
OS string // darwin, windows or linux
Arch string // arm64 or amd64
// Size is the disk0 logical size; default 8 MiB (one short chunk). Use
// ContractSize for a disk with full 512 MiB chunks and a zero chunk.
Size int64
// DataAt lists offsets where 64 KiB of pseudo-random data is written;
// default puts data in the first and last chunk so the middle chunk is zero.
DataAt []int64
// ExtraDisk adds a 1 MiB all-zero data disk named disk1 (one zero chunk).
ExtraDisk bool
// Seed makes the data deterministic.
Seed uint64
// Version is the org.opencontainers.image.version annotation.
Version string
}
Options describe the bundle to write.
Click to show internal directories.
Click to hide internal directories.