Stack trace when running functional tests on git clone

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Stack trace when running functional tests on git clone

Post by Alfatrion » Thu Jul 19, 2018 7:49 am

I am not sure whether to write this here of in the Extension Writers Discussion forum, but here goes.

I am trying to run the functional tests for phpBB. I am on FreeBSD and have php72-mysqli installed. The forum works fine with the current config.php. When I run: `phpBB/vendor/bin/phpunit --group functional` then I get exceptions relating to the dbms. I have no clue on how to solve this.

Code: Select all

260) phpbb_functional_visit_installer_test
RuntimeException: You have specified an invalid dbms driver:  in /disk/www/data/integration/phpBB/phpbb/config_php_file.php:158
Stack trace:
#0 /disk/www/data/integration/tests/test_framework/phpbb_test_case_helpers.php(144): phpbb\config_php_file->convert_30_dbms_to_31(NULL)
#1 /disk/www/data/integration/tests/test_framework/phpbb_functional_test_case.php(49): phpbb_test_case_helpers::get_test_config()
#2 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(672): phpbb_functional_test_case::setUpBeforeClass()
#3 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#4 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#5 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(440): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#6 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/Command.php(149): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#7 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run(Array, true)
#8 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main()
#9 {main}
FAILURES!
Tests: 2514, Assertions: 0, Errors: 260.
My phpBB/config.php:

Code: Select all

<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = '';
$dbport = '';
$dbname = 'forum';
$dbuser = 'root';
$dbpasswd = '';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
@define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
@define('DEBUG_CONTAINER', true);
@define('DEBUG', true);
A list of all the installed ports/packages.

Code: Select all

mod_php72-7.2.5                    =
php72-7.2.5                        =
php72-bz2-7.2.5                    =
php72-ctype-7.2.5                  =
php72-curl-7.2.5                   =
php72-dom-7.2.5                    =
php72-extensions-1.0               =
php72-filter-7.2.5                 =
php72-gd-7.2.5                     =
php72-hash-7.2.5                   =
php72-iconv-7.2.5                  =
php72-json-7.2.5                   =
php72-mbstring-7.2.5               =
php72-mysqli-7.2.5                 =
php72-opcache-7.2.5                =
php72-openssl-7.2.5                =
php72-pdo-7.2.5                    =
php72-pdo_sqlite-7.2.5             =
php72-phar-7.2.5                   =
php72-posix-7.2.5                  =
php72-session-7.2.5                =
php72-simplexml-7.2.5              =
php72-sqlite3-7.2.5                =
php72-tokenizer-7.2.5              =
php72-xml-7.2.5                    =
php72-xmlreader-7.2.5              =
php72-xmlwriter-7.2.5              =
php72-zip-7.2.5                    =
php72-zlib-7.2.5                   =
phpMyAdmin-php72-4.8.0.1_1         =
phpbb3-3.2.2                       =
I installed phpbb3 from the port so I get all the dependencies. I use a clone of the git version for testing.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49340
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Stack trace when running functional tests on git clone

Post by stevemaury » Thu Jul 19, 2018 2:27 pm

This post relates to server configuration/operation and we do not support that, sorry.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
AbaddonOrmuz
Registered User
Posts: 343
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: Stack trace when running functional tests on git clone

Post by AbaddonOrmuz » Thu Jul 19, 2018 6:15 pm

The config file for testing must be placed at tests/test_config.php not phpBB/config.php

https://area51.phpbb.com/docs/dev/3.2.x ... sting.html
https://github.com/phpbb/phpbb/blob/3.2 ... G_TESTS.md

For example, my config file looks like this:

Code: Select all

<?php

$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '3306';
$dbname = 'dev_phpbbtest';
$dbuser = '';
$dbpasswd = '';
$phpbb_functional_url = 'http://localhost/phpbb-test/phpBB/';
A proudly user of Arch Linux :: /r/sddm_themes

User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: Stack trace when running functional tests on git clone

Post by Alfatrion » Fri Jul 20, 2018 11:58 am

Thanks for you help. I indeed messed up with the configuration file. I now get another exception, that I do not understand.

Mysql runs at localhost:3306. The forum works with the configuration above and phpMyAdmin also works.

Code: Select all

Exception: Unable to connect to mysql:host=localhost;port=3306 using PDO with error: could not find driver in /disk/www/data/integration/tests/test_framework/phpbb_database_test_connection_manager.php:146
Stack trace:
#0 /disk/www/data/integration/tests/test_framework/phpbb_database_test_connection_manager.php(234): phpbb_database_test_connection_manager->connect(false)
#1 /disk/www/data/integration/tests/test_framework/phpbb_functional_test_case.php(444): phpbb_database_test_connection_manager->recreate_db()
#2 /disk/www/data/integration/tests/test_framework/phpbb_functional_test_case.php(276): phpbb_functional_test_case::recreate_database(Array)
#3 /disk/www/data/integration/tests/test_framework/phpbb_functional_test_case.php(65): phpbb_functional_test_case::install_board()
#4 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(672): phpbb_functional_test_case::setUpBeforeClass()
#5 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#6 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#7 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(440): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#8 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/Command.php(149): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#9 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run(Array, true)
#10 /disk/www/data/integration/phpBB/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main()
#11 {main}
What driver is it trying to load and at what location?

My tests/test_config.php

Code: Select all

<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '3306';
$dbname = 'forum';
$dbuser = 'root';
$dbpasswd = '';
$phpbb_functional_url = 'http://localhost/integration/phpBB/';
I also tried:

Code: Select all

$dbhost = '';
$dbport = '';
stevemaury wrote:
Thu Jul 19, 2018 2:27 pm
This post relates to server configuration/operation and we do not support that, sorry.
If this is a problem with the "server" configuration, then could you please help me understanding what phpBB complains about? I doubt that I am missing a dependency, because the forum 3.2 works, it is just some tests that give exceptions.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24494
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Stack trace when running functional tests on git clone

Post by Paul » Fri Jul 20, 2018 12:05 pm

You probarbly will need to install the pdo_mysqli extension in php.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19733
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably . . .

Re: Stack trace when running functional tests on git clone

Post by Mick » Fri Jul 20, 2018 12:20 pm

stevemaury wrote:
Thu Jul 19, 2018 2:27 pm
This post relates to server configuration/operation and we do not support that, sorry
This means we don’t support server setup. I’ll move this to discussion.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24494
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Stack trace when running functional tests on git clone

Post by Paul » Fri Jul 20, 2018 12:37 pm

Mick wrote:
Fri Jul 20, 2018 12:20 pm
stevemaury wrote:
Thu Jul 19, 2018 2:27 pm
This post relates to server configuration/operation and we do not support that, sorry
This means we don’t support server setup. I’ll move this to discussion.
It is not server Setup, this is development support. Moved to extension writers.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: Ger and 7 guests