Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option memory of SQLite not working #95

Open
lukepass opened this issue Jan 10, 2019 · 4 comments
Open

Option memory of SQLite not working #95

lukepass opened this issue Jan 10, 2019 · 4 comments

Comments

@lukepass
Copy link

Hello, in Symfony 3.4, I tried using the memory option in order to make my tests faster but an error occurred:

1) Tests\AppBundle\Controller\DefaultControllerTest::testIndex
copy(mydb): failed to open stream: No such file or directory

My test config is the following:

imports:
    - { resource: config_dev.yml }

framework:
    test: ~
    session:
        storage_id: session.storage.mock_file
        name: MOCKSESSION
    profiler:
        collect: false

web_profiler:
    toolbar: false
    intercept_redirects: false

swiftmailer:
    disable_delivery: true

liip_functional_test:
    cache_db:
        sqlite: liip_functional_test.services_database_backup.sqlite

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                driver:   pdo_sqlite
                memory:   true
security:
    firewalls:
        main:
            http_basic: ~

Thank you.

@alexislefebvre
Copy link
Collaborator

Can you remove sqlite: liip_functional_test.services_database_backup.sqlite and try again? I don't know if backups and memory: true are compatible.

@lukepass
Copy link
Author

I would like to keep the cached version because it's handy to just replace the database with all the fixtures.

@lpassini-mz
Copy link

Is there a way to make this work manually? Thanks.

@lukepass
Copy link
Author

This issue could be related to this one:

doctrine/dbal#2901

Maybe if the option was added it could work?

@alexislefebvre alexislefebvre transferred this issue from liip/LiipFunctionalTestBundle Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants