Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10828

PostgreSQL dbal tests try to connect to the database named as user specified in configuration

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.10
    • 3.0.12-RC1
    • None
    • None

    Description

      I configured the following test_config.php for postgres:

      <?php
          $dbms = 'postgres';
          $dbhost = 'localhost';
          $dbport = '';
          $dbname = 'qi_x93';
          $dbuser = 'qi';
          $dbpasswd = '';
      

      Note that user and database names are different.

      Now when I run the test suite I get a ton of errors like this:

      174) phpbb_session_init_test::test_login_session_create
      Exception: Unable do connect to pgsql:host=localhost using PDO with error: SQLSTATE[08006] [7] FATAL:  database "qi" does not exist
       
      /home/phpdev/test-phpbb/tests/test_framework/phpbb_database_test_connection_manager.php:93
      /home/phpdev/test-phpbb/tests/test_framework/phpbb_database_test_connection_manager.php:129
      /home/phpdev/test-phpbb/tests/test_framework/phpbb_database_test_case.php:61
      /home/pie/apps/git-phpunit-bundle/phpunit.php:44
      

      As it says I have no "qi" database, but it should not be connecting to it.

      Note that connecting to the same database as your user name might be a default in various pg-related software.

      This could be a pdo bug.

      Attachments

        Activity

          People

            Oleg Oleg [X] (Inactive)
            Oleg Oleg [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: