Pre-commit.php database user root?

Hi

I’m trying to run
“./scripts/pre-commit.php -o infinera-groove”

But I get the following errors

Only checking os: infinera-groove
Running unit tests…
Starting snmpsim listening on 127.1.6.2:1162…
PHPUnit 7.5.12 by Sebastian Bergmann and contributors.

.EE… 8 / 8 (100%)

Time: 5.34 seconds, Memory: 42.00 MB

There were 2 errors:

  1. LibreNMS\Tests\OSModulesTest::testDataIsValid with data set “infinera-groove” (‘infinera-groove’, ‘’, array(‘os’, ‘ports’, ‘sensors’))
    Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [1698] Access denied for user ‘root’@‘localhost’

Both .env and config.php seems to be correct with user librenms. A var_dump() in bootstrap.php shows that it reads config.php.

any suggestions?

Kindly
Magnus

You can set the db credentials for tests with DB_TEST_USERNAME (etc) in .env

Thanks, couldn’t use root as non root user.

Now I get
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [1049] Unknown database ‘librenms_phpunit_78hunjuybybh’

How do I create it?