-
Notifications
You must be signed in to change notification settings - Fork 14
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
maint(pam/integration-tests): Run all the tests with a shared authd when possible #593
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
==========================================
- Coverage 83.43% 83.07% -0.37%
==========================================
Files 83 88 +5
Lines 8689 8979 +290
Branches 74 74
==========================================
+ Hits 7250 7459 +209
- Misses 1111 1174 +63
- Partials 328 346 +18 ☔ View full report in Codecov by Sentry. |
4bd8ec9
to
1493b08
Compare
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'm not going to lie, I'm a bit worried... I like the idea of using a single instance as much as possible, but it will be handling an insane amount of requests (which is not a real use case [how many users do we expect to authenticate in the "same" moment?]).
This feels like it would be a pain to debug and fix if it starts going wrong, no? I'm just wondering if we might not be shooting ourselves in the foot here...
@adombeck, @didrocks any opinions regarding the above?
Despite the rambling: changes look good to me but a comment about naming, easy to fix.
gPasswd string | ||
groups string |
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.
These are a bit vague... Do you mind updating them to indicate better what they mean or add a comment for them?
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.
Changed the naming, let me know if it's better.
Indeed it's not meant to respect a real scenario, but experience taught me that the more we stress a system, the more potential issues can arise. So, in case we can also make this opt-in and just happen in the race job though. |
I agree that as we don’t have a context ID, this could make things difficult. How hard would it be to only run in this mode if we are in race mode? |
Not much, it's just about inverting the logic, so it should be doable. |
Blocked by #661 for now, let's wait to reconsider |
1cc9930
to
5265441
Compare
5265441
to
efe85f9
Compare
This is now handled via efe85f9 |
efe85f9
to
e02ae0d
Compare
We can then expose these cleanly
Use const variables to build expected example broker user names so that we can be more reliable when testing them
…er names This is valid for the standard case, while on specific cases we still rely on manual names
This includes very long user names or prompt values
So we can run a shared authd for everything
… tests So that we won't clash with other test in the suite
…l tests So we can run a shared authd for everything
We removed the temporary dir on test cleanup but we may want to keep the lifecycle of the daemon bound to the daemon itself instead
The user name now has only to contain the pre-check value prefix while we don't care about its location to allow more combination of cases (such as pre-check MFA users).
… daemon The daemon is ref-counted in order to decide when killing it, so that multiple tests can share the same daemon if they want to
…nces It can be useful for debugging purposes
In case of issues it allows easier debugging
…by default In case, the env variable AUTHD_TESTS_USE_SHARED_AUTHD_INSTANCES can be set to force it even in non-race test runs
…vhs output Since the introduction of the VHS wait feature we may get the data race output as VHS error, so let's handle it earlier if vhs process fails. We still keep the check in the golden file, as we may still get a race output after a successful Wait.
f176f2c
to
3a62dcf
Compare
Run by default all the tests using an unique instance of authd daemon running so that we can test better that all the codepaths work well with lots of concurrency.
Leaving this as a draft for now because it has dependencies on some commits of #583UDENG-5377