Skip to content

Commit

Permalink
Revert test reformattings
Browse files Browse the repository at this point in the history
Signed-off-by: litt3 <102969658+litt3@users.noreply.github.com>
  • Loading branch information
litt3 committed Jan 14, 2025
1 parent 6e2c4f2 commit d2d7bea
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions api/clients/eigenda_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ func TestPutRetrieveBlobIFFTSuccess(t *testing.T) {
},
}
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(
&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo},
nil).Once())
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo}, nil).Once())
(disperserClient.On("RetrieveBlob", mock.Anything, mock.Anything, mock.Anything).
Return(nil, nil).Once()) // pass nil in as the return blob to tell the mock to return the corresponding blob
logger := log.NewLogger(log.DiscardHandler())
Expand Down Expand Up @@ -119,9 +117,7 @@ func TestPutRetrieveBlobIFFTNoDecodeSuccess(t *testing.T) {
},
}
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(
&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo},
nil).Once())
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo}, nil).Once())
(disperserClient.On("RetrieveBlob", mock.Anything, mock.Anything, mock.Anything).
Return(nil, nil).Once()) // pass nil in as the return blob to tell the mock to return the corresponding blob
logger := log.NewLogger(log.DiscardHandler())
Expand Down Expand Up @@ -192,9 +188,7 @@ func TestPutRetrieveBlobNoIFFTSuccess(t *testing.T) {
},
}
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(
&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo},
nil).Once())
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo}, nil).Once())
(disperserClient.On("RetrieveBlob", mock.Anything, mock.Anything, mock.Anything).
Return(nil, nil).Once()) // pass nil in as the return blob to tell the mock to return the corresponding blob
logger := log.NewLogger(log.DiscardHandler())
Expand Down Expand Up @@ -386,10 +380,9 @@ func TestPutBlobIndividualRequestTimeout(t *testing.T) {
(disperserClient.On("DisperseBlobAuthenticated", mock.Anything, mock.Anything, mock.Anything).
Return(&expectedBlobStatus, []byte("mock-request-id"), nil))
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Run(
func(args mock.Arguments) {
time.Sleep(100 * time.Millisecond) // Simulate a 100ms delay, which should fail the request
}).
Run(func(args mock.Arguments) {
time.Sleep(100 * time.Millisecond) // Simulate a 100ms delay, which should fail the request
}).
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_PROCESSING}, nil).Once())
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_DISPERSING}, nil).Once())
Expand Down Expand Up @@ -418,9 +411,7 @@ func TestPutBlobIndividualRequestTimeout(t *testing.T) {
},
}
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(
&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo},
nil).Once())
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo}, nil).Once())
logger := log.NewLogger(log.DiscardHandler())
eigendaClient := clients.EigenDAClient{
Log: logger,
Expand Down Expand Up @@ -451,10 +442,9 @@ func TestPutBlobTotalTimeout(t *testing.T) {
(disperserClient.On("DisperseBlobAuthenticated", mock.Anything, mock.Anything, mock.Anything).
Return(&expectedBlobStatus, []byte("mock-request-id"), nil))
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Run(
func(args mock.Arguments) {
time.Sleep(100 * time.Millisecond) // Simulate a 100ms delay, which should fail the request
}).
Run(func(args mock.Arguments) {
time.Sleep(100 * time.Millisecond) // Simulate a 100ms delay, which should fail the request
}).
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_PROCESSING}, nil).Once())
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_DISPERSING}, nil).Once())
Expand Down Expand Up @@ -483,9 +473,7 @@ func TestPutBlobTotalTimeout(t *testing.T) {
},
}
(disperserClient.On("GetBlobStatus", mock.Anything, mock.Anything).
Return(
&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo},
nil).Once())
Return(&grpcdisperser.BlobStatusReply{Status: grpcdisperser.BlobStatus_FINALIZED, Info: finalizedBlobInfo}, nil).Once())
logger := log.NewLogger(log.DiscardHandler())
eigendaClient := clients.EigenDAClient{
Log: logger,
Expand Down

0 comments on commit d2d7bea

Please sign in to comment.