matiit
matiit

Reputation: 8017

Codeception - can't use DB module, because of invalid configuration

I've added DB module to acceptance suite. And I've put:

modules:
    config:
        Db:
            dsn: 'sqlite:storage/database.sqlite'
            user:
            password:
            dump: tests/_data/dump.sql

in codeception.yml

Then i need to build:

cept build gives me:

  [Codeception\Exception\ModuleConfig]
  Db module is not configured!
  Options: dsn, user, password are required
                  Please, update the configuration and set all the required fields

It's the same when I set user and password for dummy values.

I think sqlite doesn't need user and password - I can't get it work. I would appreciate any help, I'm clearly missing something.

Upvotes: 1

Views: 1306

Answers (3)

BenSorter
BenSorter

Reputation: 364

You should set the user and password to empty values '' instead of nothing:

Db:
      dsn: 'sqlite:storage/database.sqlite'
      user: ''
      password: ''
      dump: tests/_data/dump.sql

Upvotes: 1

Khoa Le
Khoa Le

Reputation: 11

Db module requires user and password, these have filled

Upvotes: 0

poh
poh

Reputation: 171

try

modules:
    enabled: [Db]
    config:
        Db:
            dsn: 'sqlite:storage/database.sqlite'
            user:
            password:
            dump: tests/_data/dump.sql

Upvotes: 0

Related Questions