View Issue Details

IDProjectCategoryView StatusLast Update
0007110OXID eShop (all versions)7. --- Other tools --------------public2024-12-04 15:21
Reporterfbender Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version6.2.0 
Summary0007110: vendor/bin/runtests doesn't return error exit code if setup fails
DescriptionFor our module we use a Github Actions Workflow to automatically run tests against our module in the context of an Oxid 6 setup.

Due to https://github.blog/changelog/2020-02-21-github-actions-breaking-change-ubuntu-virtual-environments-will-no-longer-start-the-mysql-service-automatically/ the tests weren't run, because the database service wasn't there. The "runtests" Script complained about this, and rightly so, but didn't throw any kind of error code, so our builds were always green, despite the tests not being run.

I'd expect the script to fail with any non-success code if anything couldn't be set up.
Steps To ReproduceSee https://github.com/PAYONE-GmbH/oxid-6/runs/550951132?check_suite_focus=true#step:10:8
TagsUnit Tests
ThemeNot defined
BrowserNot defined
PHP Version7.2
Database VersionMySQL 5.6

Activities

QA

2020-04-01 11:23

administrator   ~0013166

-MK

EE: 6.2.0

root@a59c9b619382:/var/www/html# vendor/bin/runtests
=========
running php version 7.3.12

============
Failed to install shop with message: Could not connect to 'db' with user 'oxid'

#0 /var/www/html/vendor/oxid-esales/testing-library/library/Services/ShopInstaller/ShopInstaller.php(54): OxidEsales\TestingLibrary\Services\Library\DatabaseHandler->__construct(Object(OxidEsales\Eshop\Core\ConfigFile))
#1 /var/www/html/vendor/oxid-esales/testing-library/library/Services/ServiceFactory.php(48): OxidEsales\TestingLibrary\Services\ShopInstaller\ShopInstaller->__construct(Object(OxidEsales\TestingLibrary\Services\Library\ServiceConfig))
#2 /var/www/html/vendor/oxid-esales/testing-library/library/ServiceCaller.php(146): OxidEsales\TestingLibrary\Services\ServiceFactory->createService('ShopInstaller')
#3 /var/www/html/vendor/oxid-esales/testing-library/library/ServiceCaller.php(88): OxidEsales\TestingLibrary\ServiceCaller->callLocalService('ShopInstaller')
#4 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/BootstrapBase.php(133): OxidEsales\TestingLibrary\ServiceCaller->callService('ShopInstaller')
#5 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/BootstrapBase.php(46): OxidEsales\TestingLibrary\Bootstrap\BootstrapBase->installShop()
#6 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/UnitBootstrap.php(20): OxidEsales\TestingLibrary\Bootstrap\BootstrapBase->init()
#7 /var/www/html/vendor/oxid-esales/testing-library/bootstrap.php(34): OxidEsales\TestingLibrary\Bootstrap\UnitBootstrap->init()
#8 /var/www/html/vendor/phpunit/phpunit/src/Util/Fileloader.php(64): include_once('/var/www/html/v...')
#9 /var/www/html/vendor/phpunit/phpunit/src/Util/Fileloader.php(48): PHPUnit\Util\Fileloader::load('/var/www/html/v...')
#10 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(991): PHPUnit\Util\Fileloader::checkAndLoad('/var/www/html/v...')
0000011 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(786): PHPUnit\TextUI\Command->handleBootstrap('/var/www/html/v...')
0000012 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(159): PHPUnit\TextUI\Command->handleArguments(Array)
0000013 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
0000014 /var/www/html/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
0000015 {main}Failed to install shop with message: Could not connect to 'db' with user 'oxid'

#0 /var/www/html/vendor/oxid-esales/testing-library/library/Services/ShopInstaller/ShopInstaller.php(54): OxidEsales\TestingLibrary\Services\Library\DatabaseHandler->__construct(Object(OxidEsales\Eshop\Core\ConfigFile))
#1 /var/www/html/vendor/oxid-esales/testing-library/library/Services/ServiceFactory.php(48): OxidEsales\TestingLibrary\Services\ShopInstaller\ShopInstaller->__construct(Object(OxidEsales\TestingLibrary\Services\Library\ServiceConfig))
#2 /var/www/html/vendor/oxid-esales/testing-library/library/ServiceCaller.php(146): OxidEsales\TestingLibrary\Services\ServiceFactory->createService('ShopInstaller')
#3 /var/www/html/vendor/oxid-esales/testing-library/library/ServiceCaller.php(88): OxidEsales\TestingLibrary\ServiceCaller->callLocalService('ShopInstaller')
#4 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/BootstrapBase.php(133): OxidEsales\TestingLibrary\ServiceCaller->callService('ShopInstaller')
#5 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/BootstrapBase.php(46): OxidEsales\TestingLibrary\Bootstrap\BootstrapBase->installShop()
#6 /var/www/html/vendor/oxid-esales/testing-library/library/Bootstrap/UnitBootstrap.php(20): OxidEsales\TestingLibrary\Bootstrap\BootstrapBase->init()
#7 /var/www/html/vendor/oxid-esales/testing-library/bootstrap.php(34): OxidEsales\TestingLibrary\Bootstrap\UnitBootstrap->init()
#8 /var/www/html/vendor/phpunit/phpunit/src/Util/Fileloader.php(64): include_once('/var/www/html/v...')
#9 /var/www/html/vendor/phpunit/phpunit/src/Util/Fileloader.php(48): PHPUnit\Util\Fileloader::load('/var/www/html/v...')
#10 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(991): PHPUnit\Util\Fileloader::checkAndLoad('/var/www/html/v...')
0000011 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(786): PHPUnit\TextUI\Command->handleBootstrap('/var/www/html/v...')
0000012 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(159): PHPUnit\TextUI\Command->handleArguments(Array)
0000013 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
0000014 /var/www/html/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
0000015 {main}root@a59c9b619382:/var/www/html# 

SvenBrunk

2024-12-04 15:21

administrator   ~0017753

This is part of the old, deprecated testing library. The testing library was discontinued and will not get any more updates.