forked from Layr-Labs/eigenda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: eigenda client returns 503 errors (for failover purpose) (Layr-…
- Loading branch information
Showing
11 changed files
with
276 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package clients_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
"time" | ||
|
||
"github.com/Layr-Labs/eigenda/api/clients" | ||
"github.com/Layr-Labs/eigenda/core/auth" | ||
"github.com/stretchr/testify/assert" | ||
"google.golang.org/grpc/codes" | ||
"google.golang.org/grpc/status" | ||
) | ||
|
||
func TestPutBlobNoopSigner(t *testing.T) { | ||
config := clients.NewConfig("nohost", "noport", time.Second, false) | ||
disperserClient := clients.NewDisperserClient(config, auth.NewLocalNoopSigner()) | ||
|
||
test := []byte("test") | ||
test[0] = 0x00 // make sure the first byte of the requst is always 0 | ||
quorums := []uint8{0} | ||
_, _, err := disperserClient.DisperseBlobAuthenticated(context.Background(), test, quorums) | ||
st, isGRPCError := status.FromError(err) | ||
assert.True(t, isGRPCError) | ||
assert.Equal(t, codes.InvalidArgument.String(), st.Code().String()) | ||
assert.Equal(t, "please configure signer key if you want to use authenticated endpoint noop signer cannot get accountID", st.Message()) | ||
} |
Oops, something went wrong.