Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 93677c8

Browse filesBrowse files
committed
[Lock][WIP] Test DynamoDbStore against local DynamoDB instance in integration tests
1 parent c606c47 commit 93677c8
Copy full SHA for 93677c8

File tree

Expand file treeCollapse file tree

2 files changed

+19
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-3
lines changed

‎.github/workflows/integration-tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/integration-tests.yml
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- 8093:8093
122122
- 8094:8094
123123
- 11210:11210
124-
sqs:
124+
aws:
125125
image: localstack/localstack:3.0.2
126126
ports:
127127
- 4566:4566
@@ -254,6 +254,7 @@ jobs:
254254
run: ./phpunit --group integration -v
255255
env:
256256
INTEGRATION_FTP_URL: 'ftp://test:test@localhost'
257+
LOCK_DYNAMODB_DSN: "dynamodb://localhost:4566/lock_keys"
257258
REDIS_HOST: 'localhost:16379'
258259
REDIS_AUTHENTICATED_HOST: 'localhost:16380'
259260
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'

‎src/Symfony/Component/Lock/Bridge/DynamoDb/Tests/Store/DynamoDbStoreTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Bridge/DynamoDb/Tests/Store/DynamoDbStoreTest.php
+17-2Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,27 @@
33

44
namespace Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store;
55

6+
use Symfony\Component\Lock\Bridge\DynamoDb\Store\DynamoDbStore;
67
use Symfony\Component\Lock\PersistingStoreInterface;
8+
use Symfony\Component\Lock\Tests\Store\AbstractStoreTestCase;
79

8-
class DynamoDbStoreTest
10+
/**
11+
* @group integration
12+
*/
13+
class DynamoDbStoreTest extends AbstractStoreTestCase
914
{
15+
public static function setUpBeforeClass(): void
16+
{
17+
if (!getenv('LOCK_DYNAMODB_DSN')) {
18+
self::markTestSkipped('DynamoDB server not found.');
19+
}
20+
21+
$store = new DynamoDbStore(getenv('LOCK_DYNAMODB_DSN'));
22+
$store->createTable();
23+
}
24+
1025
protected function getStore(): PersistingStoreInterface
1126
{
12-
// What should we do here...? :)
27+
return new DynamoDbStore(getenv('LOCK_DYNAMODB_DSN'));
1328
}
1429
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.