Add infra necessary to run API tests with specific server config#2468
Add infra necessary to run API tests with specific server config#2468acelaya wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2468 +/- ##
=============================================
+ Coverage 94.21% 96.77% +2.55%
Complexity 1605 1605
=============================================
Files 273 273
Lines 5017 5017
=============================================
+ Hits 4727 4855 +128
+ Misses 290 162 -128 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
These changes seem to be working consistently in CI, but in my local dev env the tests are very flaky, or they even make other tests fail even if the env-specific tests pass. I'm still not sure what's the reason. It feels like something is "cached" and the wrong env vars are loaded, or perhaps it's a timing issue, although I have tried adding some Another thing that could be causing this is that an env var is set, and then reloading the server, even if the env vars file is no longer present, does not reset previously "promoted" env vars simply because the process is still running. I need to verify if this is the case. |
7773102 to
8892407
Compare
8892407 to
e2ebae9
Compare
fd8dbcd to
11fa0a1
Compare
Part of #1009
Add necessary configuration to run API tests with a different server config, and one test using it as a proof of concept.
The process works as follows:
#[WithEnvVars([...])]attribute will cause the RoadRunner server to be restarted including the list of env vars.For this to work, this PR defines a PHPUnit extension that registers two listeners.