Closed jclaveau closed 2 years ago
@jclaveau thank you for your work mate :)
Well in case of synchronous projections, they are not set up automatically. I have added a command in 1.10.5, to initialize projection from CLI.
You can call this Command from your tests first in order to prepare the projection. For the demo projection it happens here now: https://github.com/ecotoneframework/php-ddd-cqrs-event-sourcing-symfony-ecotone/blob/master/docker/4-setup-projection.sh
Let me know, if it answers your question :)
@dgafka This PR is now ready for a review (My bug was due to a UUID regexp, not to projection initialization, thank you for your reply)
Feel free to rebase it, if you're still interested in contribution. Closing it for now :)
This PR targets having an example of continuous integration with Ecotone and Symfony (Still looking for a professional smooth workflow :) ). So it ships:
Integration tests
for eachGithub workflow
to run it "as a developer would"I post it here in a wip state because I'm stuck: When I run my tests, events are correctly triggered but not async projections. This is not due to Phpunit itself but only to the
APP_ENV
as this issue occurs when I run a command on an event sourced aggregate only: https://github.com/jclaveau/php-ddd-cqrs-event-sourcing-symfony-ecotone/blob/testing_commands/src/UI/Cli/Ticket/PrepareTicketCliCommand.phpEvent sourced Ticket prepare command generates a stream but, contrary to dev env, no asynchronous projection is added to the projections table (It's created but remains empty):
I wondered if it was due to the fact there is no container running projections in test env but when I try
I get
Digging in the docs I tried some options without success: https://github.com/jclaveau/php-ddd-cqrs-event-sourcing-symfony-ecotone/blob/testing_commands/src/Infrastructure/EcotoneConfiguration.php
I'm not enough aware of Ecotone to know if this is a usage issue or a bug so let me know if a should open a bug on Ecotone's repo.
Thanks in advance!