-
Notifications
You must be signed in to change notification settings - Fork 32
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
IBX-764: Added Kernel / Repository Test API #212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to see a consumption example by 1st party package.
The major issue however I have with this solution is a cyclic dependency on ezplatform-core
. While it might not be visible atm, it always causes composer installation issues at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this needs to be split into 2 or 3 parts:
- Namespaces should be introduced to ezpublish-kernel:7.5 since EOM is March 2022, so there's 100% chance that we will need it there anyway
- Fixer changes (maybe with what I mentioned in the diff comment that follows) need to be separated
- Repository Test API changes need to be separated (IBX-764)
2 & 3 can remain in this PR but as separate commits. In this case mark the PR as [FAST FORWARD MERGE]
and add relevant label.
@alongosz extracted PHP namespace changes to ezsystems/ezpublish-kernel#3111, since they should be merged up from ezplatform EDIT: Converting to draft to prevent accidental merge. |
c8638d2
to
c2b2718
Compare
46cb172
to
76a4c7a
Compare
e2d2845
to
c33dc8b
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Merged into |
v3.3
yes/no - depending on whether we feel ok with exposing the test base right nowNo, only internal useAdds
IbexaTestKernel
&IbexaKernelTestCase
as base for other packages for wholesome integration tests.The main selling point of those tests is that they also test our service declarations. They are also easy to expand upon by adding more bundles / services into the test Kernel, and makes use of built-in service compilation (which makes the tests faster).
Potentially, by using
WebTestCase
from Symfony, even routes can be tested.Addition of MySQL and Postgres tests will be done in a following PRCurrent integration tests remain unchanged and will be adjusted in following PRs.Supports Postgres integration tests
Due to issues with MySQL / MariaDB images those tests can be enabled in a separate PR.
Security hotspots reported by Sonar
False-positives. They're related to
md5
usage when creating a hash for temporary directory that stores compiled Kernel.Other changes
To allow tests with different environments to produce different Kernels, whole environment is used to calculate cache hash. This allows for multiple tests to be run on a local machine, without issues coming from Kernel cache file re-use.
Checklist:
$ composer fix-cs
).@ezsystems/php-dev-team
).