@@ -32,7 +32,7 @@ import (
3232)
3333
3434func TestBrickCreate (t * testing.T ) {
35- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
35+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
3636 require .Nil (t , err )
3737 brickService := NewService (nil , bricksIndex , nil )
3838
@@ -102,7 +102,7 @@ func TestBrickCreate(t *testing.T) {
102102 require .Nil (t , err )
103103 err = paths .New ("testdata/dummy-app" ).CopyDirTo (tempDummyApp )
104104 require .Nil (t , err )
105- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
105+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
106106 require .Nil (t , err )
107107 brickService := NewService (nil , bricksIndex , nil )
108108
@@ -129,7 +129,7 @@ func TestBrickCreate(t *testing.T) {
129129}
130130
131131func TestUpdateBrick (t * testing.T ) {
132- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
132+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
133133 require .Nil (t , err )
134134 brickService := NewService (nil , bricksIndex , nil )
135135
@@ -189,7 +189,7 @@ func TestUpdateBrick(t *testing.T) {
189189 tempDummyApp := paths .New ("testdata/dummy-app.temp" )
190190 require .Nil (t , tempDummyApp .RemoveAll ())
191191 require .Nil (t , paths .New ("testdata/dummy-app" ).CopyDirTo (tempDummyApp ))
192- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
192+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
193193 require .Nil (t , err )
194194 brickService := NewService (nil , bricksIndex , nil )
195195
@@ -218,7 +218,7 @@ func TestUpdateBrick(t *testing.T) {
218218 tempDummyApp := paths .New ("testdata/dummy-app-for-update.temp" )
219219 require .Nil (t , tempDummyApp .RemoveAll ())
220220 require .Nil (t , paths .New ("testdata/dummy-app-for-update" ).CopyDirTo (tempDummyApp ))
221- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
221+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
222222 require .Nil (t , err )
223223 brickService := NewService (nil , bricksIndex , nil )
224224
0 commit comments