Documentation
¶
Index ¶
- func BenchmarkIndex(b *testing.B, idx pack.ArchiveIndex)
- func BenchmarkLookup(b *testing.B, idx pack.ArchiveIndex)
- func RandomIndexFile(records int) pack.IndexFile
- func TestArchiveIndex(t *testing.T, idx pack.ArchiveIndex)
- func TestArchiveIndexCopies(t *testing.T, idx pack.ArchiveIndex)
- func TestArchiveIndexExclusion(t *testing.T, idx pack.ArchiveIndex)
- func TestArchiveIndexSessions(t *testing.T, idx pack.ArchiveIndex)
- func TestArchiveIndexTombstones(t *testing.T, idx pack.ArchiveIndex)
- func TestArchiveStorage(t *testing.T, store pack.ArchiveStorage)
- func TestArchiveVersions(t *testing.T, idx pack.ArchiveIndex)
- func TestClaimIndex(t *testing.T, idx ClaimingIndex)
- type ClaimingIndex
- type TestArchive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchmarkIndex ¶
func BenchmarkIndex(b *testing.B, idx pack.ArchiveIndex)
BenchmarkIndex times IndexArchive on an archive of b.N records.
func BenchmarkLookup ¶
func BenchmarkLookup(b *testing.B, idx pack.ArchiveIndex)
BenchmarkLookup times LocateObject over ten indexed archives.
func RandomIndexFile ¶
RandomIndexFile makes records with random sums, unsorted.
func TestArchiveIndex ¶
func TestArchiveIndex(t *testing.T, idx pack.ArchiveIndex)
TestArchiveIndex exercises indexing, lookup and deletion on idx.
func TestArchiveIndexCopies ¶
func TestArchiveIndexCopies(t *testing.T, idx pack.ArchiveIndex)
TestArchiveIndexCopies checks that LocateCopies finds every committed copy of each ref, however many refs it is asked about, and those in a pending archive only for its own session.
func TestArchiveIndexExclusion ¶
func TestArchiveIndexExclusion(t *testing.T, idx pack.ArchiveIndex)
TestArchiveIndexExclusion checks that LocateObject skips excluded archives.
func TestArchiveIndexSessions ¶
func TestArchiveIndexSessions(t *testing.T, idx pack.ArchiveIndex)
TestArchiveIndexSessions checks session visibility, commit and abort.
func TestArchiveIndexTombstones ¶
func TestArchiveIndexTombstones(t *testing.T, idx pack.ArchiveIndex)
TestArchiveIndexTombstones checks that LocateTombstones finds the tombstone records of the refs and passes over every other record.
func TestArchiveStorage ¶
func TestArchiveStorage(t *testing.T, store pack.ArchiveStorage)
TestArchiveStorage runs the ArchiveStorage contract against an empty store and leaves it empty.
func TestArchiveVersions ¶
func TestArchiveVersions(t *testing.T, idx pack.ArchiveIndex)
TestArchiveVersions checks that idx keeps each archive's creation time, fills in one it lacked, and keeps the versions records were carried with.
func TestClaimIndex ¶
func TestClaimIndex(t *testing.T, idx ClaimingIndex)
TestClaimIndex checks open archives: their claims, finalizing, abandoning, and what a commit or an abort does with them.
Types ¶
type ClaimingIndex ¶
type ClaimingIndex interface {
pack.ArchiveIndex
pack.ClaimIndex
}
ClaimingIndex is an archive index that also takes claims on open archives.
type TestArchive ¶
type TestArchive struct {
// contains filtered or unexported fields
}
TestArchive is a random archive name and index for exercising an ArchiveIndex.
func RandomArchive ¶
func RandomArchive(numRecords int) TestArchive
RandomArchive makes a TestArchive with numRecords random records.
func (TestArchive) Index ¶
func (a TestArchive) Index() pack.IndexFile
Index is the archive's index file.