Skip to content

Commit 489b34f

Browse files
committed
chore: fix gofmt alignment in chunk_test.go
1 parent a0b73a1 commit 489b34f

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

pkg/api/chunk_test.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ func TestChunkUploadSOC(t *testing.T) {
298298

299299
t.Run("soc upload returns soc address", func(t *testing.T) {
300300
var (
301-
mockSOC = testingsoc.GenerateMockSOC(t, []byte("test payload"))
302-
socChunk = mockSOC.Chunk()
303-
storerMock = mockstorer.New()
301+
mockSOC = testingsoc.GenerateMockSOC(t, []byte("test payload"))
302+
socChunk = mockSOC.Chunk()
303+
storerMock = mockstorer.New()
304304
client, _, _, _ = newTestServer(t, testServerOptions{
305305
Storer: storerMock,
306306
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -319,9 +319,9 @@ func TestChunkUploadSOC(t *testing.T) {
319319

320320
t.Run("soc upload chunk is retrievable", func(t *testing.T) {
321321
var (
322-
mockSOC = testingsoc.GenerateMockSOC(t, []byte("retrievable"))
323-
socChunk = mockSOC.Chunk()
324-
storerMock = mockstorer.New()
322+
mockSOC = testingsoc.GenerateMockSOC(t, []byte("retrievable"))
323+
socChunk = mockSOC.Chunk()
324+
storerMock = mockstorer.New()
325325
client, _, _, _ = newTestServer(t, testServerOptions{
326326
Storer: storerMock,
327327
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -359,9 +359,9 @@ func TestChunkUploadSOC(t *testing.T) {
359359

360360
t.Run("soc direct upload", func(t *testing.T) {
361361
var (
362-
mockSOC = testingsoc.GenerateMockSOC(t, []byte("direct"))
363-
socChunk = mockSOC.Chunk()
364-
storerMock = mockstorer.New()
362+
mockSOC = testingsoc.GenerateMockSOC(t, []byte("direct"))
363+
socChunk = mockSOC.Chunk()
364+
storerMock = mockstorer.New()
365365
client, _, _, chanStorer = newTestServer(t, testServerOptions{
366366
Storer: storerMock,
367367
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -384,8 +384,8 @@ func TestChunkUploadSOC(t *testing.T) {
384384

385385
t.Run("cac upload still works", func(t *testing.T) {
386386
var (
387-
chunk = testingc.GenerateTestRandomChunk()
388-
storerMock = mockstorer.New()
387+
chunk = testingc.GenerateTestRandomChunk()
388+
storerMock = mockstorer.New()
389389
client, _, _, _ = newTestServer(t, testServerOptions{
390390
Storer: storerMock,
391391
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -404,8 +404,8 @@ func TestChunkUploadSOC(t *testing.T) {
404404
t.Run("cac upload small payload", func(t *testing.T) {
405405
// Minimal CAC: span (8 bytes) + 1 byte payload = 9 bytes total
406406
var (
407-
cacChunk, _ = cac.New([]byte{0x01})
408-
storerMock = mockstorer.New()
407+
cacChunk, _ = cac.New([]byte{0x01})
408+
storerMock = mockstorer.New()
409409
client, _, _, _ = newTestServer(t, testServerOptions{
410410
Storer: storerMock,
411411
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -424,9 +424,9 @@ func TestChunkUploadSOC(t *testing.T) {
424424
t.Run("cac upload max payload", func(t *testing.T) {
425425
// Maximum CAC: span (8 bytes) + 4096 byte payload = 4104 bytes total
426426
var (
427-
payload = make([]byte, swarm.ChunkSize)
428-
cacChunk, _ = cac.New(payload)
429-
storerMock = mockstorer.New()
427+
payload = make([]byte, swarm.ChunkSize)
428+
cacChunk, _ = cac.New(payload)
429+
storerMock = mockstorer.New()
430430
client, _, _, _ = newTestServer(t, testServerOptions{
431431
Storer: storerMock,
432432
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -462,9 +462,9 @@ func TestChunkUploadSOC(t *testing.T) {
462462
// Data that is >= SocMinChunkSize (105 bytes) but not a valid SOC
463463
// (random data won't have valid ECDSA signature). Should fall back to CAC.
464464
var (
465-
payload = make([]byte, swarm.SocMinChunkSize-swarm.SpanSize) // 97 bytes payload
466-
cacChunk, _ = cac.New(payload) // 105 bytes total (span + 97)
467-
storerMock = mockstorer.New()
465+
payload = make([]byte, swarm.SocMinChunkSize-swarm.SpanSize) // 97 bytes payload
466+
cacChunk, _ = cac.New(payload) // 105 bytes total (span + 97)
467+
storerMock = mockstorer.New()
468468
client, _, _, _ = newTestServer(t, testServerOptions{
469469
Storer: storerMock,
470470
Post: mockpost.New(mockpost.WithAcceptAll()),
@@ -482,10 +482,10 @@ func TestChunkUploadSOC(t *testing.T) {
482482

483483
t.Run("soc with pre-signed stamp", func(t *testing.T) {
484484
var (
485-
mockSOC = testingsoc.GenerateMockSOC(t, []byte("stamped"))
486-
socChunk = mockSOC.Chunk()
487-
storerMock = mockstorer.New()
488-
batchStore = mockbatchstore.New()
485+
mockSOC = testingsoc.GenerateMockSOC(t, []byte("stamped"))
486+
socChunk = mockSOC.Chunk()
487+
storerMock = mockstorer.New()
488+
batchStore = mockbatchstore.New()
489489
client, _, _, _ = newTestServer(t, testServerOptions{
490490
Storer: storerMock,
491491
BatchStore: batchStore,

0 commit comments

Comments
 (0)