@@ -219,7 +219,7 @@ func TestController_CommitsGetBranchCommitLogHandler(t *testing.T) {
219
219
for i := 0 ; i < commitsLen ; i ++ {
220
220
n := strconv .Itoa (i + 1 )
221
221
p := "foo/bar" + n
222
- testutil .MustDo (t , "create entry bar" + n , deps .cataloger .CreateEntry (ctx , "repo2" , "master" , catalog.Entry {Path : p , PhysicalAddress : "bar" + n + "addr" , CreationDate : time .Now (), Size : int64 (i ) + 1 , Checksum : "cksum" + n }))
222
+ testutil .MustDo (t , "create entry bar" + n , deps .cataloger .CreateEntry (ctx , "repo2" , "master" , catalog.DBEntry {Path : p , PhysicalAddress : "bar" + n + "addr" , CreationDate : time .Now (), Size : int64 (i ) + 1 , Checksum : "cksum" + n }))
223
223
if _ , err := deps .cataloger .Commit (ctx , "repo2" , "master" , "commit" + n , "some_user" , nil ); err != nil {
224
224
t .Fatalf ("failed to commit '%s': %s" , p , err )
225
225
}
@@ -266,7 +266,7 @@ func TestController_GetCommitHandler(t *testing.T) {
266
266
ctx := context .Background ()
267
267
_ , err := deps .cataloger .CreateRepository (ctx , "foo1" , "s3://foo1" , "master" )
268
268
testutil .Must (t , err )
269
- testutil .MustDo (t , "create entry bar1" , deps .cataloger .CreateEntry (ctx , "foo1" , "master" , catalog.Entry {Path : "foo/bar1" , PhysicalAddress : "bar1addr" , CreationDate : time .Now (), Size : 1 , Checksum : "cksum1" }))
269
+ testutil .MustDo (t , "create entry bar1" , deps .cataloger .CreateEntry (ctx , "foo1" , "master" , catalog.DBEntry {Path : "foo/bar1" , PhysicalAddress : "bar1addr" , CreationDate : time .Now (), Size : 1 , Checksum : "cksum1" }))
270
270
commit1 , err := deps .cataloger .Commit (ctx , "foo1" , "master" , "some message" , DefaultUserID , nil )
271
271
testutil .Must (t , err )
272
272
reference1 , err := deps .cataloger .GetBranchReference (ctx , "foo1" , "master" )
@@ -324,7 +324,7 @@ func TestController_CommitHandler(t *testing.T) {
324
324
ctx := context .Background ()
325
325
_ , err := deps .cataloger .CreateRepository (ctx , "foo1" , "s3://foo1" , "master" )
326
326
testutil .MustDo (t , "create repo foo1" , err )
327
- testutil .MustDo (t , "commit bar on foo1" , deps .cataloger .CreateEntry (ctx , "foo1" , "master" , catalog.Entry {Path : "foo/bar" , PhysicalAddress : "pa" , CreationDate : time .Now (), Size : 666 , Checksum : "cs" , Metadata : nil }))
327
+ testutil .MustDo (t , "commit bar on foo1" , deps .cataloger .CreateEntry (ctx , "foo1" , "master" , catalog.DBEntry {Path : "foo/bar" , PhysicalAddress : "pa" , CreationDate : time .Now (), Size : 666 , Checksum : "cs" , Metadata : nil }))
328
328
_ , err = clt .Commits .Commit (
329
329
commits .NewCommitParamsWithTimeout (timeout ).
330
330
WithBranch ("master" ).
@@ -492,7 +492,7 @@ func TestController_ListBranchesHandler(t *testing.T) {
492
492
testutil .Must (t , err )
493
493
494
494
// create first dummy commit on master so that we can create branches from it
495
- testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo2" , "master" , catalog.Entry {Path : "a/b" }))
495
+ testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo2" , "master" , catalog.DBEntry {Path : "a/b" }))
496
496
_ , err = deps .cataloger .Commit (ctx , "repo2" , "master" , "first commit" , "test" , nil )
497
497
testutil .Must (t , err )
498
498
@@ -557,7 +557,7 @@ func TestController_ListTagsHandler(t *testing.T) {
557
557
ctx := context .Background ()
558
558
_ , err := deps .cataloger .CreateRepository (ctx , "repo1" , "local://foo1" , "master" )
559
559
testutil .Must (t , err )
560
- testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {Path : "obj1" }))
560
+ testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {Path : "obj1" }))
561
561
commitLog , err := deps .cataloger .Commit (ctx , "repo1" , "master" , "first commit" , "test" , nil )
562
562
testutil .Must (t , err )
563
563
const createTagLen = 7
@@ -653,7 +653,7 @@ func TestController_GetBranchHandler(t *testing.T) {
653
653
const testBranch = "master"
654
654
_ , err := deps .cataloger .CreateRepository (ctx , "repo1" , "s3://foo1" , testBranch )
655
655
// create first dummy commit on master so that we can create branches from it
656
- testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , testBranch , catalog.Entry {Path : "a/b" }))
656
+ testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , testBranch , catalog.DBEntry {Path : "a/b" }))
657
657
_ , err = deps .cataloger .Commit (ctx , "repo1" , testBranch , "first commit" , "test" , nil )
658
658
testutil .Must (t , err )
659
659
@@ -706,7 +706,7 @@ func TestController_CreateBranchHandler(t *testing.T) {
706
706
ctx := context .Background ()
707
707
_ , err := deps .cataloger .CreateRepository (ctx , "repo1" , "s3://foo1" , "master" )
708
708
testutil .Must (t , err )
709
- testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {Path : "a/b" }))
709
+ testutil .Must (t , deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {Path : "a/b" }))
710
710
_ , err = deps .cataloger .Commit (ctx , "repo1" , "master" , "first commit" , "test" , nil )
711
711
testutil .Must (t , err )
712
712
@@ -800,7 +800,7 @@ func TestController_DeleteBranchHandler(t *testing.T) {
800
800
ctx := context .Background ()
801
801
_ , err := deps .cataloger .CreateRepository (ctx , "my-new-repo" , "s3://foo1" , "master" )
802
802
testutil .Must (t , err )
803
- testutil .Must (t , deps .cataloger .CreateEntry (ctx , "my-new-repo" , "master" , catalog.Entry {Path : "a/b" }))
803
+ testutil .Must (t , deps .cataloger .CreateEntry (ctx , "my-new-repo" , "master" , catalog.DBEntry {Path : "a/b" }))
804
804
_ , err = deps .cataloger .Commit (ctx , "my-new-repo" , "master" , "first commit" , "test" , nil )
805
805
testutil .Must (t , err )
806
806
@@ -852,7 +852,7 @@ func TestController_ObjectsStatObjectHandler(t *testing.T) {
852
852
}
853
853
854
854
t .Run ("get object stats" , func (t * testing.T ) {
855
- entry := catalog.Entry {
855
+ entry := catalog.DBEntry {
856
856
Path : "foo/bar" ,
857
857
PhysicalAddress : "this_is_bars_address" ,
858
858
CreationDate : time .Now (),
@@ -909,15 +909,15 @@ func TestController_ObjectsListObjectsHandler(t *testing.T) {
909
909
_ , err := deps .cataloger .CreateRepository (ctx , "repo1" , "gs://bucket/prefix" , "master" )
910
910
testutil .Must (t , err )
911
911
testutil .Must (t ,
912
- deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {
912
+ deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {
913
913
Path : "foo/bar" ,
914
914
PhysicalAddress : "this_is_bars_address" ,
915
915
CreationDate : time .Now (),
916
916
Size : 666 ,
917
917
Checksum : "this_is_a_checksum" ,
918
918
}))
919
919
testutil .Must (t ,
920
- deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {
920
+ deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {
921
921
Path : "foo/quuux" ,
922
922
PhysicalAddress : "this_is_quuxs_address_expired" ,
923
923
CreationDate : time .Now (),
@@ -926,15 +926,15 @@ func TestController_ObjectsListObjectsHandler(t *testing.T) {
926
926
Expired : true ,
927
927
}))
928
928
testutil .Must (t ,
929
- deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {
929
+ deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {
930
930
Path : "foo/baz" ,
931
931
PhysicalAddress : "this_is_bazs_address" ,
932
932
CreationDate : time .Now (),
933
933
Size : 666 ,
934
934
Checksum : "baz_checksum" ,
935
935
}))
936
936
testutil .Must (t ,
937
- deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.Entry {
937
+ deps .cataloger .CreateEntry (ctx , "repo1" , "master" , catalog.DBEntry {
938
938
Path : "foo/a_dir/baz" ,
939
939
PhysicalAddress : "this_is_bazs_address" ,
940
940
CreationDate : time .Now (),
@@ -1006,7 +1006,7 @@ func TestController_ObjectsGetObjectHandler(t *testing.T) {
1006
1006
if err != nil {
1007
1007
t .Fatal (err )
1008
1008
}
1009
- entry := catalog.Entry {
1009
+ entry := catalog.DBEntry {
1010
1010
Path : "foo/bar" ,
1011
1011
PhysicalAddress : blob .PhysicalAddress ,
1012
1012
CreationDate : time .Now (),
@@ -1016,7 +1016,7 @@ func TestController_ObjectsGetObjectHandler(t *testing.T) {
1016
1016
testutil .Must (t ,
1017
1017
deps .cataloger .CreateEntry (ctx , "repo1" , "master" , entry ))
1018
1018
1019
- expired := catalog.Entry {
1019
+ expired := catalog.DBEntry {
1020
1020
Path : "foo/expired" ,
1021
1021
PhysicalAddress : "an_expired_physical_address" ,
1022
1022
CreationDate : time .Now (),
0 commit comments