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

Travis tests fail on Postgres because database does not exist

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.12-RC1
    • Component/s: Test Suite
    • Labels:
      None

      Description

      Travis tests fail with this error:

      761) phpbb_config_db_test::test_load_config

      77Exception: Unable do connect to pgsql:host=localhost;port=5432;dbname=phpbb_tests using PDO with error: SQLSTATE[08006] [7] FATAL: database "phpbb_tests" does not exist

        Issue Links

          Activity

          Hide
          naderman Nils Adermann added a comment -

          Correct link type

          Show
          naderman Nils Adermann added a comment - Correct link type
          Hide
          Noxwizard Patrick Webster added a comment -

          This is actually caused by a mistake in the .travis.yml file that was never caught. The DB environment variable for running tests on PostgreSQL is 'postgres', while the checks for database creation are for 'pgsql'.

          Since the database name wasn't getting used properly in the tests, it was most likely falling back to the postgres database that is created by default. After the fixes from PHPBB3-10828 and PHPBB3-10678 were applied, the database name was correctly specified and the problem became visible.

          Show
          Noxwizard Patrick Webster added a comment - This is actually caused by a mistake in the .travis.yml file that was never caught. The DB environment variable for running tests on PostgreSQL is 'postgres', while the checks for database creation are for 'pgsql'. Since the database name wasn't getting used properly in the tests, it was most likely falling back to the postgres database that is created by default. After the fixes from PHPBB3-10828 and PHPBB3-10678 were applied, the database name was correctly specified and the problem became visible.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              naderman Nils Adermann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development