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

EZP-30061: Created integration tests schema using Schema Importer #2548

Merged

Conversation

3 participants
@alongosz
Copy link
Member

commented Feb 22, 2019

Question Answer
JIRA issue EZP-30061
Related to EZP-29938
Requires ezsystems/doctrine-dbal-schema#1
Bug/Improvement no
New feature yes
Target version 7.5 (master) for eZ Platform v2.5 LTS
BC breaks no
Tests pass yes
Doc needed no

This PR changes the way Repository integration test schema is built to use SchemaImporter from ezsystems/doctrine-dbal-schema. It re-uses schema.yaml used by eZ Platform installer. While disadvantage is it creates more tables (once on all tests startup), we can at least be sure that installer is still going to work.

It also includes some simplifications of test setup like removal of dead code, resolving outstanding "todo", sharing common integration test setup for ES and introducing dedicated test db connection factory to avoid using the deprecated one.

TODO:

  • Remove TMP commit.
  • Provide better description once this is ready for review.
  • Drop integration test db schemas for SQLite, MySQL and PostgreSQL.
  • Provide schema.yaml file common for clean installer and tests.
  • Use eZ Systems Doctrine Schema Importer to import schema from Yaml to a db
  • Cleanup code after testing.
  • Confirm CI passes
  • Extract bug fixes to other PRs
  • Move SqliteSessionInit to doctrine-dbal-schema
  • Try to get db connection from a class that is actually not deprecated ;)
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@alongosz alongosz force-pushed the alongosz:ezp-30061-use-schema-importer-in-tests branch from 3a8d162 to 800810d Mar 4, 2019

@alongosz alongosz marked this pull request as ready for review Mar 4, 2019

@alongosz alongosz force-pushed the alongosz:ezp-30061-use-schema-importer-in-tests branch from 800810d to 8ab8bf4 Mar 4, 2019

@alongosz alongosz closed this Mar 4, 2019

@alongosz alongosz deleted the alongosz:ezp-30061-use-schema-importer-in-tests branch Mar 4, 2019

@alongosz alongosz restored the alongosz:ezp-30061-use-schema-importer-in-tests branch Mar 5, 2019

@alongosz alongosz reopened this Mar 5, 2019

@alongosz alongosz force-pushed the alongosz:ezp-30061-use-schema-importer-in-tests branch 2 times, most recently from ddeb5dc to 84ebf4c Mar 5, 2019

@alongosz alongosz force-pushed the alongosz:ezp-30061-use-schema-importer-in-tests branch from 84ebf4c to 7878ce8 Mar 19, 2019

alongosz added some commits Mar 19, 2019

Implemented DatabaseConnectionFactory for Repository integration tests
On purpose not using
eZ\Publish\Core\Persistence\Doctrine\ConnectionHandler::createConnectionFromDSN
as it is deprecated
Imported integration tests db schema using SchemaImporter
SchemaImporter is eZ Systems cross-DBMS tool built on top of Doctrine\DBAL

@alongosz alongosz force-pushed the alongosz:ezp-30061-use-schema-importer-in-tests branch from 7878ce8 to 05065bf Apr 16, 2019

@alongosz

This comment has been minimized.

Copy link
Member Author

commented Apr 17, 2019

Thanks for reviews!

FYI @ezsystems/qa-team this PR modifies integration tests setup, so no QA is required. I also compared Travis execution time between master and this PR and it looks like there's no difference - as expected.

Merging.

@alongosz alongosz merged commit 8625f39 into ezsystems:master Apr 17, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@alongosz alongosz deleted the alongosz:ezp-30061-use-schema-importer-in-tests branch Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.