Skip to content

Commit

Permalink
[backend] add account field to aws mock for ddb table (#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
angethuy authored Jul 12, 2023
1 parent 3f376af commit 09a2d1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/mock/service/awsmock/awsmock.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ func (s *svc) S3GetBucketPolicy(ctx context.Context, account, region, bucket, ac

func (s *svc) DescribeTable(ctx context.Context, account, region, tableName string) (*dynamodbv1.Table, error) {
ret := &dynamodbv1.Table{
Name: tableName,
Region: region,
Name: tableName,
Region: region,
Account: "default",
ProvisionedThroughput: &dynamodbv1.Throughput{
ReadCapacityUnits: 100,
WriteCapacityUnits: 200,
Expand Down Expand Up @@ -194,6 +195,7 @@ func (s *svc) UpdateCapacity(ctx context.Context, account, region, tableName str
ret := &dynamodbv1.Table{
Name: tableName,
Region: region,
Account: "default",
ProvisionedThroughput: currentThroughput,
Status: dynamodbv1.Table_Status(3),
GlobalSecondaryIndexes: gsis,
Expand Down
1 change: 1 addition & 0 deletions backend/module/dynamodb/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var g = []*dynamodbv1.GlobalSecondaryIndex{
var testTable = &dynamodbv1.Table{
Name: "",
Region: "",
Account: "default",
ProvisionedThroughput: pt,
GlobalSecondaryIndexes: g,
Status: dynamodbv1.Table_Status(3),
Expand Down

0 comments on commit 09a2d1d

Please sign in to comment.