Skip to content

Commit

Permalink
blockservice: stop using deprecated NewWriteThrough in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Jan 15, 2024
1 parent 02c77b4 commit afd5403
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blockservice/blockservice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestWriteThroughWorks(t *testing.T) {
}
exchbstore := blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore()))
exch := offline.Exchange(exchbstore)
bserv := NewWriteThrough(bstore, exch)
bserv := New(bstore, exch, WriteThrough())
bgen := butil.NewBlockGenerator()

block := bgen.Next()
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestExchangeWrite(t *testing.T) {
offline.Exchange(exchbstore),
0,
}
bserv := NewWriteThrough(bstore, exch)
bserv := New(bstore, exch, WriteThrough())
bgen := butil.NewBlockGenerator()

for name, fetcher := range map[string]BlockGetter{
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestLazySessionInitialization(t *testing.T) {
session := offline.Exchange(bstore2)
exch := offline.Exchange(bstore3)
sessionExch := &fakeSessionExchange{Interface: exch, session: session}
bservSessEx := NewWriteThrough(bstore, sessionExch)
bservSessEx := New(bstore, sessionExch, WriteThrough())
bgen := butil.NewBlockGenerator()

block := bgen.Next()
Expand Down Expand Up @@ -234,8 +234,8 @@ func TestNilExchange(t *testing.T) {
block := bgen.Next()

bs := blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore()))
bserv := NewWriteThrough(bs, nil)
sess := NewSession(ctx, bserv)

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go this)

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-check / All

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go next)

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go this)

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go next)

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go this)

undefined: bserv

Check failure on line 237 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go next)

undefined: bserv
bserv := New(bs, nil, WriteThrough())

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go this)

bserv declared and not used

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-check / All

bserv declared and not used (compile)

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go next)

bserv declared and not used

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go this)

bserv declared and not used

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go next)

bserv declared and not used

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go this)

bserv declared and not used

Check failure on line 238 in blockservice/blockservice_test.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go next)

bserv declared and not used
_, err := sess.GetBlock(ctx, block.Cid())
if !ipld.IsNotFound(err) {
t.Fatal("expected block to not be found")
Expand Down

0 comments on commit afd5403

Please sign in to comment.