(t *testing.T, ctx context.Context, s *LFSStore)
| 62 | } |
| 63 | |
| 64 | func lfsGetObjectByOID(t *testing.T, ctx context.Context, s *LFSStore) { |
| 65 | // Create a LFS object |
| 66 | repoID := int64(1) |
| 67 | oid := lfsutil.OID("ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f") |
| 68 | err := s.CreateObject(ctx, repoID, oid, 12, lfsutil.StorageLocal) |
| 69 | require.NoError(t, err) |
| 70 | |
| 71 | // We should be able to get it back |
| 72 | _, err = s.GetObjectByOID(ctx, repoID, oid) |
| 73 | require.NoError(t, err) |
| 74 | |
| 75 | // Try to get a non-existent object |
| 76 | _, err = s.GetObjectByOID(ctx, repoID, "bad_oid") |
| 77 | expErr := ErrLFSObjectNotExist{args: errutil.Args{"repoID": repoID, "oid": lfsutil.OID("bad_oid")}} |
| 78 | assert.Equal(t, expErr, err) |
| 79 | } |
| 80 | |
| 81 | func lfsGetObjectsByOIDs(t *testing.T, ctx context.Context, s *LFSStore) { |
| 82 | // Create two LFS objects |
nothing calls this directly
no test coverage detected