File tree Expand file tree Collapse file tree
enqueue-bundle/Tests/Functional/App/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,13 +37,11 @@ services:
3737 - AWS_SQS_REGION=us-east-1
3838 - AWS_SQS_ENDPOINT=http://localstack:4576
3939 - AWS_SQS_VERSION=latest
40- - BEANSTALKD_HOST=beanstalkd
41- - BEANSTALKD_PORT=11300
4240 - BEANSTALKD_DSN=beanstalk://beanstalkd:11300
4341 - GEARMAN_DSN=gearman://gearmand:4730
42+ - MONGO_DSN=mongodb://mongo
4443 - RDKAFKA_HOST=kafka
4544 - RDKAFKA_PORT=9092
46- - MONGO_DSN=mongodb://mongo
4745
4846 rabbitmq :
4947 image : ' enqueue/rabbitmq:3.7'
Original file line number Diff line number Diff line change 11parameters :
22 locale : ' en'
33 secret : ' ThisTokenIsNotSoSecretChangeIt'
4- env(AWS_SQS_REGION) : ' us-east-1'
5- env(AWS_SQS_VERSION) : ' latest'
6- env(AWS_SQS_KEY) : ' key'
7- env(AWS_SQS_SECRET) : ' secret'
8- env(AWS_SQS_ENDPOINT) : ' http://localstack:4576'
94
105framework :
116 # esi: ~
Original file line number Diff line number Diff line change 1717
1818use Enqueue \Sqs \SqsConnectionFactory ;
1919
20- $ config = [
21- 'key ' => getenv ('AWS_SQS_KEY ' ),
22- 'secret ' => getenv ('AWS_SQS_SECRET ' ),
23- 'region ' => getenv ('AWS_SQS_REGION ' ),
24- ];
25-
26- $ factory = new SqsConnectionFactory ($ config );
20+ $ factory = new SqsConnectionFactory (getenv ('SQS_DSN ' ));
2721$ context = $ factory ->createContext ();
2822
2923$ queue = $ context ->createQueue ('enqueue ' );
Original file line number Diff line number Diff line change 1717
1818use Enqueue \Sqs \SqsConnectionFactory ;
1919
20- $ config = [
21- 'key ' => getenv ('AWS_SQS_KEY ' ),
22- 'secret ' => getenv ('AWS_SQS_SECRET ' ),
23- 'region ' => getenv ('AWS_SQS_REGION ' ),
24- ];
25-
26- $ factory = new SqsConnectionFactory ($ config );
20+ $ factory = new SqsConnectionFactory (getenv ('SQS_DSN ' ));
2721$ context = $ factory ->createContext ();
2822
2923$ queue = $ context ->createQueue ('enqueue ' );
Original file line number Diff line number Diff line change @@ -9,19 +9,10 @@ trait SqsExtension
99{
1010 private function buildSqsContext (): SqsContext
1111 {
12- if (false == getenv ( ' AWS_SQS_ENDPOINT ' ) && false == getenv ('AWS_SQS_KEY ' )) {
12+ if (false == $ dsn = getenv ('SQS_DSN ' )) {
1313 throw new \PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
1414 }
1515
16- $ config = [
17- 'key ' => getenv ('AWS_SQS_KEY ' ),
18- 'secret ' => getenv ('AWS_SQS_SECRET ' ),
19- 'region ' => getenv ('AWS_SQS_REGION ' ),
20- 'version ' => getenv ('AWS_SQS_VERSION ' ),
21- 'endpoint ' => getenv ('AWS_SQS_ENDPOINT ' ),
22- 'lazy ' => false ,
23- ];
24-
25- return (new SqsConnectionFactory ($ config ))->createContext ();
16+ return (new SqsConnectionFactory ($ dsn ))->createContext ();
2617 }
2718}
You can’t perform that action at this time.
0 commit comments