diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-20 01:08:12 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-20 01:08:12 -0400 |
commit | 6777286ba15d5bd05d0fcd9921049761bf2f59c0 (patch) | |
tree | bbb47bcda4f98ebbf0cfa9c49a21b1077ff675cf /pkg/api/api0/api0testutil | |
parent | f0051d99fd62a3776987bb25cf7f147022c2b93b (diff) | |
download | Atlas-6777286ba15d5bd05d0fcd9921049761bf2f59c0.tar.gz Atlas-6777286ba15d5bd05d0fcd9921049761bf2f59c0.zip |
all: Make PdataStorage SetPdata return the stored pdata size
Diffstat (limited to 'pkg/api/api0/api0testutil')
-rw-r--r-- | pkg/api/api0/api0testutil/storage.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/api0/api0testutil/storage.go b/pkg/api/api0/api0testutil/storage.go index 80020fd..f6972a5 100644 --- a/pkg/api/api0/api0testutil/storage.go +++ b/pkg/api/api0/api0testutil/storage.go @@ -364,7 +364,7 @@ func TestPdataStorage(t *testing.T, s api0.PdataStorage) { } }) t.Run("PutUser1Pdata1", func(t *testing.T) { - if err := s.SetPdata(user1, pdata1); err != nil { + if _, err := s.SetPdata(user1, pdata1); err != nil { t.Fatalf("unexpected error: %v", err) } }) @@ -416,7 +416,7 @@ func TestPdataStorage(t *testing.T, s api0.PdataStorage) { } }) t.Run("PutUser1Pdata2", func(t *testing.T) { - if err := s.SetPdata(user1, pdata2); err != nil { + if _, err := s.SetPdata(user1, pdata2); err != nil { t.Fatalf("unexpected error: %v", err) } }) @@ -504,7 +504,7 @@ func TestPdataStorage(t *testing.T, s api0.PdataStorage) { } randSched() - if err := s.SetPdata(uid, data1); err != nil { + if _, err := s.SetPdata(uid, data1); err != nil { fail.Store(3) return } @@ -528,7 +528,7 @@ func TestPdataStorage(t *testing.T, s api0.PdataStorage) { } randSched() - if err := s.SetPdata(uid, data2); err != nil { + if _, err := s.SetPdata(uid, data2); err != nil { fail.Store(7) return } |