Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat test bug #14441

Open
duchnoun opened this issue Oct 13, 2022 · 3 comments
Open

Behat test bug #14441

duchnoun opened this issue Oct 13, 2022 · 3 comments
Labels
Docker Docker-related issues and PRs.

Comments

@duchnoun
Copy link

When i try to launch Behat test ;

'ive got this error :

Running fixture "locale"...
2022-10-13T09:16:08.360469400Z Running fixture "currency"...
2022-10-13T09:16:08.370259800Z Running fixture "geographical"...
2022-10-13T09:16:08.399221700Z Running fixture "taxon"...
2022-10-13T09:16:08.450576900Z Running fixture "channel"...
2022-10-13T09:16:08.465744000Z Running fixture "payment_method"...
2022-10-13T09:16:08.467926700Z
2022-10-13T09:16:08.468020100Z Warning: require(/app/var/cache/test_cached/doctrine/orm/Proxies/CG__SyliusComponentCoreModelShopBillingData.php): Failed to open stream: No such file or directory in /app/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php on line 197
2022-10-13T09:16:08.474039800Z
2022-10-13T09:16:08.482471800Z In AbstractProxyFactory.php line 197:
2022-10-13T09:16:08.482540600Z
2022-10-13T09:16:08.482555900Z Failed opening required '/app/var/cache/test_cached/doctrine/orm/Proxies/

2022-10-13T09:16:08.482563700Z CG__SyliusComponentCoreModelShopBillingData.php' (include_path='.:/usr/shar
2022-10-13T09:16:08.482571700Z e/php')
2022-10-13T09:16:08.482578100Z

I launch service docker file : docker-compose.test.yaml

I miss something ?

@CoderMaggie
Copy link
Member

Sylius issues should be used to report bugs, propose new features, and discuss new functionalities. For quick help please use our Slack channel.

@Ferror as it is Docker related, will you have a moment to look at it?

@CoderMaggie CoderMaggie added the Docker Docker-related issues and PRs. label Oct 14, 2022
@diimpp
Copy link
Member

diimpp commented Nov 23, 2022

Reproduced the same.

@Ferror this makes both docker-compose files in the project fully broken. :)
Might be a good idea to setup CI to build those images once in while.

behat_1   | Step 5 of 5. Installing assets.
behat_1   | -------------------------------
behat_1   | 
behat_1   | Installing Sylius assets for environment test_cached.
behat_1   |  2/2 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 100% 0/1 [░                           ]   0%
behat_1   | 
behat_1   | 
behat_1   |  [OK] Sylius has been successfully installed.                                   
behat_1   | 
behat_1   | You can now open your store at the following path under the website root: /
behat_1   | bin/console sylius:fixtures:load default --no-interaction
behat_1   |  1/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 100%Running suite "default"...  
behat_1   | Running fixture "locale"...  
behat_1   | Running fixture "currency"...  
behat_1   | Running fixture "geographical"...  
behat_1   | Running fixture "taxon"...  
behat_1   | Running fixture "channel"...  
behat_1   | Running fixture "payment_method"...  
behat_1   | 
behat_1   | Warning: require(/app/var/cache/test_cached/doctrine/orm/Proxies/__CG__SyliusComponentCoreModelShopBillingData.php): Failed to open stream: No such file or directory in /app/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php on line 197
behat_1   | 
behat_1   | In AbstractProxyFactory.php line 197:
behat_1   |                                                                                
behat_1   |   Failed opening required '/app/var/cache/test_cached/doctrine/orm/Proxies/__  
behat_1   |   CG__SyliusComponentCoreModelShopBillingData.php' (include_path='.:/usr/shar  
behat_1   |   e/php')                                                                      
behat_1   |                                                                                
behat_1   | 
behat_1   | sylius:fixtures:load [<suite>]
behat_1   | 
behat_1   | make: *** [Makefile:29: backend] Error 255

@diimpp
Copy link
Member

diimpp commented Nov 23, 2022

I was able to bypass this error by adding cache warmup to makefile, though I don't think this is a correct solution.

backend:
	bin/console doctrine:database:create --no-interaction
	bin/console cache:warmup
	bin/console sylius:install --no-interaction
	bin/console sylius:fixtures:load default --no-interaction

Note, that if backend step is interrupted, then already existing DB will block this step re-run.
Additional first step such as

	bin/console doctrine:database:drop --force --no-interaction

solves the issue, though maybe there is more graceful solution.

@Ferror Ferror removed their assignment Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs.
Projects
None yet
Development

No branches or pull requests

4 participants