Add local batched Git blob reader
This commit is contained in:
@@ -62,6 +62,13 @@ func TestCandidateObjectReadsStayLocalInPartialClones(t *testing.T) {
|
||||
if !errors.As(err, &exitError) {
|
||||
t.Fatalf("blob error %v lost its Git process cause", err)
|
||||
}
|
||||
reader := NewBlobReader(t.Context(), repository)
|
||||
if _, err := reader.Read(t.Context(), blob); err == nil || !strings.Contains(err.Error(), "missing") {
|
||||
t.Fatalf("batch blob read error = %v, want missing-object inspection error", err)
|
||||
}
|
||||
if err := reader.Close(); err != nil {
|
||||
t.Fatalf("close missing-object batch reader: %v", err)
|
||||
}
|
||||
if data, err := os.ReadFile(attempts); !errors.Is(err, os.ErrNotExist) {
|
||||
t.Fatalf("object inspection invoked remote transport: %q, %v", data, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user