diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index ad1b15f1a..ade2813c7 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -489,7 +489,7 @@ func TestCheckerBlobTypeConfusion(t *testing.T) { Nodes: []*restic.Node{malNode, dirNode}, } - rootId, err := repo.SaveTree(ctx, rootTree) + rootID, err := repo.SaveTree(ctx, rootTree) test.OK(t, err) test.OK(t, repo.Flush(ctx)) @@ -498,12 +498,12 @@ func TestCheckerBlobTypeConfusion(t *testing.T) { snapshot, err := restic.NewSnapshot([]string{"/damaged"}, []string{"test"}, "foo", time.Now()) test.OK(t, err) - snapshot.Tree = &rootId + snapshot.Tree = &rootID - snapId, err := repo.SaveJSONUnpacked(ctx, restic.SnapshotFile, snapshot) + snapID, err := repo.SaveJSONUnpacked(ctx, restic.SnapshotFile, snapshot) test.OK(t, err) - t.Logf("saved snapshot %v", snapId.Str()) + t.Logf("saved snapshot %v", snapID.Str()) delayRepo := &delayRepository{ Repository: repo, diff --git a/internal/fuse/fuse_test.go b/internal/fuse/fuse_test.go index 50128a9c0..24d8cf03d 100644 --- a/internal/fuse/fuse_test.go +++ b/internal/fuse/fuse_test.go @@ -219,17 +219,17 @@ func TestFuseDir(t *testing.T) { } // Test top-level directories for their UID and GID. -func TestTopUidGid(t *testing.T) { +func TestTopUIDGID(t *testing.T) { repo, cleanup := repository.TestRepository(t) defer cleanup() restic.TestCreateSnapshot(t, repo, time.Unix(1460289341, 207401672), 0, 0) - testTopUidGid(t, Config{}, repo, uint32(os.Getuid()), uint32(os.Getgid())) - testTopUidGid(t, Config{OwnerIsRoot: true}, repo, 0, 0) + testTopUIDGID(t, Config{}, repo, uint32(os.Getuid()), uint32(os.Getgid())) + testTopUIDGID(t, Config{OwnerIsRoot: true}, repo, 0, 0) } -func testTopUidGid(t *testing.T, cfg Config, repo restic.Repository, uid, gid uint32) { +func testTopUIDGID(t *testing.T, cfg Config, repo restic.Repository, uid, gid uint32) { t.Helper() ctx := context.Background() diff --git a/internal/pack/pack.go b/internal/pack/pack.go index c22f434d1..d679c658b 100644 --- a/internal/pack/pack.go +++ b/internal/pack/pack.go @@ -157,7 +157,7 @@ var ( const ( // size of the header-length field at the end of the file; it is a uint32 headerLengthSize = 4 - // constant overhead of the header independent of #entries + // HeaderSize is the header's constant overhead (independent of #entries) HeaderSize = headerLengthSize + crypto.Extension maxHeaderSize = 16 * 1024 * 1024 diff --git a/internal/restorer/filerestorer_test.go b/internal/restorer/filerestorer_test.go index 75433cdef..28bcd5e28 100644 --- a/internal/restorer/filerestorer_test.go +++ b/internal/restorer/filerestorer_test.go @@ -44,14 +44,6 @@ func (i *TestRepo) Lookup(bh restic.BlobHandle) []restic.PackedBlob { return packs } -func (i *TestRepo) packName(pack *packInfo) string { - return i.packsIDToName[pack.id] -} - -func (i *TestRepo) packID(name string) restic.ID { - return i.packsNameToID[name] -} - func (i *TestRepo) fileContent(file *fileInfo) string { return i.filesPathToContent[file.location] }