MCPcopy
hub / github.com/kopia/kopia / TestReaderStoredBlockNotFound

Method TestReaderStoredBlockNotFound

repo/repository_test.go:171–183  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

169}
170
171func (s *formatSpecificTestSuite) TestReaderStoredBlockNotFound(t *testing.T) {
172 ctx, env := repotesting.NewEnvironment(t, s.formatVersion)
173
174 objectID, err := object.ParseID("Ddeadbeef")
175 if err != nil {
176 t.Errorf("cannot parse object ID: %v", err)
177 }
178
179 reader, err := env.RepositoryWriter.OpenObject(ctx, objectID)
180 if !errors.Is(err, object.ErrObjectNotFound) || reader != nil {
181 t.Errorf("unexpected result: reader: %v err: %v", reader, err)
182 }
183}
184
185func writeObject(ctx context.Context, t *testing.T, rep repo.RepositoryWriter, data []byte, testCaseID string) object.ID {
186 t.Helper()

Callers

nothing calls this directly

Calls 4

NewEnvironmentFunction · 0.92
ParseIDFunction · 0.92
ErrorfMethod · 0.80
OpenObjectMethod · 0.65

Tested by

no test coverage detected