Skip to content

Commit

Permalink
test: add dynamodb to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Dec 14, 2024
1 parent 4185404 commit 9a6bea6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions inabox/deploy/localstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/Layr-Labs/eigenda/common/aws"
"github.com/Layr-Labs/eigenda/common/store"
"github.com/Layr-Labs/eigenda/core/meterer"
"github.com/Layr-Labs/eigenda/disperser/common/blobstore"
blobstorev2 "github.com/Layr-Labs/eigenda/disperser/common/v2/blobstore"
"github.com/ory/dockertest/v3"
Expand Down Expand Up @@ -134,12 +135,28 @@ func DeployResources(
return err
}

fmt.Println("Creating v2 tables")
if v2MetadataTableName != "" {
// Create v2 metadata table
_, err = test_utils.CreateTable(context.Background(), cfg, v2MetadataTableName, blobstorev2.GenerateTableSchema(v2MetadataTableName, 10, 10))
if err != nil {
return err
}

fmt.Println("Creating payment related tables")
// create payment related tables
err = meterer.CreateReservationTable(cfg, v2MetadataTableName+"_reservation")
if err != nil {
return err
}
err = meterer.CreateOnDemandTable(cfg, v2MetadataTableName+"_ondemand")
if err != nil {
return err
}
err = meterer.CreateGlobalReservationTable(cfg, v2MetadataTableName+"_global_reservation")
if err != nil {
return err
}
}

return err
Expand Down
2 changes: 2 additions & 0 deletions inabox/tests/integration_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ var _ = Describe("Inabox v2 Integration", func() {
privateKeyHex := "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcded"
signer := auth.NewLocalBlobRequestSigner(privateKeyHex)

// deploy payment dynamodb tables

disp, err := clients.NewDisperserClientV2(&clients.DisperserClientV2Config{
Hostname: "localhost",
Port: "32005",
Expand Down

0 comments on commit 9a6bea6

Please sign in to comment.