-
Notifications
You must be signed in to change notification settings - Fork 23
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
ISSUE_231 #233
ISSUE_231 #233
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## wip-version-6 #233 +/- ##
===================================================
+ Coverage 52.84% 53.04% +0.19%
- Complexity 1155 1156 +1
===================================================
Files 122 122
Lines 4320 4323 +3
===================================================
+ Hits 2283 2293 +10
+ Misses 2037 2030 -7 ☔ View full report in Codecov by Sentry. |
5ae4797
to
549d63d
Compare
Thanks for the fix @ioigoume , and for expanding the revocation tests to cover postgresql and mysql. One issue I ran into is that on my Mac the containers can't be accessed by IP but must be accessed by port mapping from localhost. E.g. I had to do something like
I assume you are using Linux (and that is what the unit tests are running on in the github actions). Does doing port mapping and connecting to localhost work on Linux? I'm wondering what is a cross platform way we can address connecting to the containers. A secondary thing is the conformance-suite github action step is failing on docker-compose not be available. I don't know if that is just a transient thing (since it worked in your earlier test runs), or if there is some adjustment that needs to be made. |
I got the docker based DB tests to run on Mac, and I think I kept the previous Linux behavior. |
Hi, hm, I use docker containers as my dev environment (I don't develop locally...). So I get error that the command 'docker' is not available (in my dev container)...
|
@cicnavi This may have to do with my last commit to Also see https://github.com/orgs/community/discussions/116610 |
I'm aware of docker compose change and have seen your commits. I can successfully run it, it's not that... |
And... now it also crossed my mind that you are actually doing integration testing (compatibility with dependent services, different parts / different systems...). This doesn't actually belong to unit tests, which should be small parts of code ran in isolation (with mocks to external dependencies if necessary).... Don't get me wrong, I think what you guys did is great and valuable, but it would be great if you could do it 'outside' of unit tests... |
@cicnavi Ah, so you are already in docker container when phpunit runs and therefor can't launch additional containers. I get what you are saying about these being integration tests. I think the other issue is that we've had 3 developers attempt to run the tests against MySQL and Postgres and the 3 of us have all had different issues getting them to work with Docker. 🤔 @ioigoume and I can chat more about it this week. Would you find it useful to run DB integration tests locally? Or would you just rely on github actions to do it? It will help us think through how to approach this. |
I think there is nothing wrong with running it locally (and in GHA). I would just like to have it separate from current unit tests so we can continue running them quickly (they currently take less then 10 secs), with standard There is actually a sample in phpunit docs which separates unit and integration tests: https://docs.phpunit.de/en/10.5/organizing-tests.html Or maybe having a totally separate phpunit config for "DB compatibility tests", since for them you would have a special instruction that they are dependent on having docker installed or similar... |
* use a free port for each container, rather than assuming specific port is free * if php is the Darwin/Mac version then default to using 127.0.0.1 as the docker/container host * error if someone use localhost string as the container host since that causes MySQL/pdo to use file sockets over tcp and fail with weird errors
…erent phpunit configuration files for unit and integration tests.
I've tried running unit tests locally and it works fine, thanks! |
Thank you @ioigoume for improving our automatic DB validation |
#231