aboutsummaryrefslogtreecommitdiff
path: root/repository/stored_test.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-19 15:27:39 +0000
committerGravatar Runxi Yu2026-03-19 15:27:39 +0000
commitba8c85ed2456c59269214f6e4f1203537fb3f6d4 (patch)
treee7f4a163dff72265b4019c4b2a0f34de22211908 /repository/stored_test.go
parentobject/stored: Use generics (diff)
signatureNo signature
*: Update call sites
Diffstat (limited to 'repository/stored_test.go')
-rw-r--r--repository/stored_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/repository/stored_test.go b/repository/stored_test.go
index cefb4cbe..fdae3f5a 100644
--- a/repository/stored_test.go
+++ b/repository/stored_test.go
@@ -33,8 +33,8 @@ func TestReadStoredTyped(t *testing.T) {
t.Fatalf("blob ID = %s, want %s", blob.ID(), blobID)
}
- if string(blob.Blob().Data) != "commit-body\n" {
- t.Fatalf("blob body = %q, want %q", blob.Blob().Data, "commit-body\n")
+ if string(blob.Object().Data) != "commit-body\n" {
+ t.Fatalf("blob body = %q, want %q", blob.Object().Data, "commit-body\n")
}
tree, err := repo.ReadStoredTree(treeID)
@@ -46,8 +46,8 @@ func TestReadStoredTyped(t *testing.T) {
t.Fatalf("tree ID = %s, want %s", tree.ID(), treeID)
}
- if len(tree.Tree().Entries) != 1 {
- t.Fatalf("tree entries = %d, want 1", len(tree.Tree().Entries))
+ if len(tree.Object().Entries) != 1 {
+ t.Fatalf("tree entries = %d, want 1", len(tree.Object().Entries))
}
commit, err := repo.ReadStoredCommit(commitID)
@@ -59,8 +59,8 @@ func TestReadStoredTyped(t *testing.T) {
t.Fatalf("commit ID = %s, want %s", commit.ID(), commitID)
}
- if commit.Commit().Tree != treeID {
- t.Fatalf("commit tree = %s, want %s", commit.Commit().Tree, treeID)
+ if commit.Object().Tree != treeID {
+ t.Fatalf("commit tree = %s, want %s", commit.Object().Tree, treeID)
}
})
}
@@ -240,7 +240,7 @@ func TestReadStoredTreeMixedModes(t *testing.T) {
}
for name, wantMode := range expect {
- entry := rootTree.Tree().Entry([]byte(name))
+ entry := rootTree.Object().Entry([]byte(name))
if entry == nil {
t.Fatalf("Entry(%q) returned nil", name)