@@ -27,7 +27,7 @@ import (
2727)
2828
2929func TestBrickCreate (t * testing.T ) {
30- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
30+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
3131 require .Nil (t , err )
3232 brickService := NewService (nil , bricksIndex , nil )
3333
@@ -97,7 +97,7 @@ func TestBrickCreate(t *testing.T) {
9797 require .Nil (t , err )
9898 err = paths .New ("testdata/dummy-app" ).CopyDirTo (tempDummyApp )
9999 require .Nil (t , err )
100- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
100+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
101101 require .Nil (t , err )
102102 brickService := NewService (nil , bricksIndex , nil )
103103
@@ -124,7 +124,7 @@ func TestBrickCreate(t *testing.T) {
124124}
125125
126126func TestUpdateBrick (t * testing.T ) {
127- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
127+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
128128 require .Nil (t , err )
129129 brickService := NewService (nil , bricksIndex , nil )
130130
@@ -184,7 +184,7 @@ func TestUpdateBrick(t *testing.T) {
184184 tempDummyApp := paths .New ("testdata/dummy-app.temp" )
185185 require .Nil (t , tempDummyApp .RemoveAll ())
186186 require .Nil (t , paths .New ("testdata/dummy-app" ).CopyDirTo (tempDummyApp ))
187- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
187+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
188188 require .Nil (t , err )
189189 brickService := NewService (nil , bricksIndex , nil )
190190
@@ -213,7 +213,7 @@ func TestUpdateBrick(t *testing.T) {
213213 tempDummyApp := paths .New ("testdata/dummy-app-for-update.temp" )
214214 require .Nil (t , tempDummyApp .RemoveAll ())
215215 require .Nil (t , paths .New ("testdata/dummy-app-for-update" ).CopyDirTo (tempDummyApp ))
216- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
216+ bricksIndex , err := bricksindex .Load (paths .New ("testdata" ))
217217 require .Nil (t , err )
218218 brickService := NewService (nil , bricksIndex , nil )
219219
0 commit comments