diff --git a/inabox/deploy/localstack.go b/inabox/deploy/localstack.go index b72e69d376..07658d0740 100644 --- a/inabox/deploy/localstack.go +++ b/inabox/deploy/localstack.go @@ -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" @@ -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 diff --git a/inabox/tests/integration_v2_test.go b/inabox/tests/integration_v2_test.go index ad68ebcb97..26fe1a1b4f 100644 --- a/inabox/tests/integration_v2_test.go +++ b/inabox/tests/integration_v2_test.go @@ -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",