-
Notifications
You must be signed in to change notification settings - Fork 257
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
Tests: Test trasformation #7831
base: master
Are you sure you want to change the base?
Conversation
e798b58
to
05ae5f2
Compare
85bd068
to
c8ffaa7
Compare
b3af7ea
to
67af1f0
Compare
src/tests/system/tests/test_cache.py
Outdated
6. The expected log entries are present in the logs | ||
:customerscenario: True | ||
""" | ||
if not isinstance(provider, (LDAP, Samba, AD)): |
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.
Let's change this condition to check for what it should skip, IPA.
if isinstance(provider, IPA):
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.
tests/test_netgroups.py:348: error: Unexpected keyword argument "domain" for "add_member" of "GenericNetgroup" [call-arg]
.venv/lib/python3.11/site-packages/sssd_test_framework/roles/generic.py:794: note: "add_member" of "GenericNetgroup" defined here
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.
So this needs to be this way only
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.
That got me thinking. First of all, why would you use @pytest.mark.topology(KnownTopologyGroup.AnyProvider)
if you're not going to test it with all the topologies in that group? In other tests you correctly put exactly the exact topologies on which this test is going to run:
@pytest.mark.topology(KnownTopology.LDAP)
@pytest.mark.topology(KnownTopology.AD)
@pytest.mark.topology(KnownTopology.Samba)
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
src/tests/system/tests/test_cache.py
Outdated
client.sssd.nss.update( | ||
filter_groups="root", filter_users="root", debug_level="9", entry_cache_nowait_percentage="50" | ||
) | ||
client.sssd.dom("test").update(entry_cache_timeout="30") |
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.
You should lower this value to the minimum possible to avoid getting stuck in this test for too long
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.
Is 30 the minimum value?
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.
yes, for this test we must
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.
Can you state the reasons? I'd like to understand why this is happening
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.
The default value is typically 5400 seconds (90 minutes), which is a reasonable balance between performance and freshness of cached data. So i am setting it to 30 second at least.
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.
Also sssd.conf says.
If the domain's entry_cache_timeout is set to 30s and entry_cache_nowait_percentage is set to 50 (percent), entries that come in after 15 seconds past the last cache update will be returned immediately, but
Valid values for this option are 0-99 and represent a percentage of the entry_cache_timeout for each domain. For performance reasons, this percentage will never reduce the nowait timeout to less than 10 seconds.
If netgroup, and we only create netgroups and assert netgroups, this should go in test_netgroup.py, as it is right now, this is where it should go. If we can extend the test to users, groups, it should go in test_cache.py. |
I am moving this test to test_netgroup.py again, before this test was placed there |
4926a4b
to
3adc070
Compare
2698672
to
39f37d7
Compare
…netgroup timeout when backend is offline SSSD does not crash in nss responder after netgroup timeout when backend is offline
Test transformation net group with generic provider