Skip to content

Commit 700ce7c

Browse files
GrahamCampbellstof
andauthored
Upgrade localstack (#1604)
* Upgrade localstack * Fix the dynamodb integration tests The new localstack version emulates AWS better, returning a consumed capacity only when the request asks for it. * Update the Sts integration test for the new localstack return values * Update the route53 expectation for the listing endpoint In the new localstack version, creating a zone automatically creates the NS and SOA records for that zone, emulating what actually happens on AWS. * Switch to 3.0.0 * Skip bad test for now --------- Co-authored-by: Christophe Coevoet <[email protected]>
1 parent 51ff2bc commit 700ce7c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ initialize: start-docker
44
start-docker:
55
docker start async_aws_localstack && exit 0 || \
66
docker start async_aws_localstack-dynamodb && exit 0 || \
7-
docker pull localstack/localstack:0.14.2 && \
8-
docker run -d -p 4575:4566 -e SERVICES=dynamodb -v /var/run/docker.sock:/var/run/docker.sock --name async_aws_localstack-dynamodb localstack/localstack:0.14.2 && \
7+
docker pull localstack/localstack:3.0.0 && \
8+
docker run -d -p 4575:4566 -e SERVICES=dynamodb -v /var/run/docker.sock:/var/run/docker.sock --name async_aws_localstack-dynamodb localstack/localstack:3.0.0 && \
99
docker run --rm --link async_aws_localstack-dynamodb:localstack martin/wait -c localstack:4566
1010

1111
test: initialize

tests/Integration/DynamoDbClientTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use AsyncAws\DynamoDb\DynamoDbClient;
88
use AsyncAws\DynamoDb\Enum\KeyType;
99
use AsyncAws\DynamoDb\Enum\ProjectionType;
10+
use AsyncAws\DynamoDb\Enum\ReturnConsumedCapacity;
1011
use AsyncAws\DynamoDb\Input\BatchGetItemInput;
1112
use AsyncAws\DynamoDb\Input\BatchWriteItemInput;
1213
use AsyncAws\DynamoDb\Input\CreateTableInput;
@@ -348,9 +349,11 @@ public function testPutItem(): void
348349
'Subject' => ['S' => 'How do I update multiple items?'],
349350
'LastPostedBy' => ['S' => '[email protected]'],
350351
],
352+
'ReturnConsumedCapacity' => ReturnConsumedCapacity::INDEXES,
351353
]);
352354

353355
$result = $client->putItem($input);
356+
self::assertNotNull($result->getConsumedCapacity());
354357
self::assertSame(1.0, $result->getConsumedCapacity()->getCapacityUnits());
355358
}
356359

0 commit comments

Comments
 (0)