[#180] node: Refactor panics in unit test

* Replace panics in unit tests by require.NoError and t.Fatalf

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2023-03-28 17:16:03 +03:00
parent 91717d4b98
commit 221203beeb
30 changed files with 76 additions and 79 deletions

View file

@ -246,7 +246,7 @@ func TestGetLocalOnly(t *testing.T) {
newSvc := func(storage *testStorage) *Service {
svc := &Service{cfg: new(cfg)}
svc.log = test.NewLogger(false)
svc.log = test.NewLogger(t, false)
svc.localStorage = storage
return svc
@ -507,7 +507,7 @@ func TestGetRemoteSmall(t *testing.T) {
newSvc := func(b *testPlacementBuilder, c *testClientCache) *Service {
svc := &Service{cfg: new(cfg)}
svc.log = test.NewLogger(false)
svc.log = test.NewLogger(t, false)
svc.localStorage = newTestStorage()
const curEpoch = 13
@ -1640,7 +1640,7 @@ func TestGetFromPastEpoch(t *testing.T) {
c22.addResult(addr, obj, nil)
svc := &Service{cfg: new(cfg)}
svc.log = test.NewLogger(false)
svc.log = test.NewLogger(t, false)
svc.localStorage = newTestStorage()
const curEpoch = 13