Skip to content

Database Backup not working properly - metadata changes in between #422

@olivermack

Description

@olivermack

I'm using 2.0.0-alpha4 with SQlite database tests. It seems as if the creation of the filename is inconsistent during test execution.

Given I'm running a single test with a single call to loadFixtures() with a single fixture on empty cache I can see that the result of \Liip\FunctionalTestBundle\Services\DatabaseBackup\SqliteDatabaseBackup::getBackupFilePath differs in isBackupActual() from backup(), thus he's checking a file that he won't write. I can imagine this is due to the way how the \Liip\FunctionalTestBundle\Services\DatabaseTools\AbstractDatabaseTool::getMetadatas() loads the metadata in contrast to the way how Doctrine is doing it under the hood.

In fact I've dumped the hashes multiple times and it changes indeed. Actually I was only able to get the backup+restore procedure running when changing the \Liip\FunctionalTestBundle\Services\DatabaseBackup\SqliteDatabaseBackup::getBackupFilePath() to hash only the serialize($this->classNames), without the metadata.

Is this reproducible for someone?

Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions