-
Notifications
You must be signed in to change notification settings - Fork 247
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: convert multihost/basic/test_basic to system/tests/test_basic #6806
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.
test_basic.py is probably not a very good name.
- kinit is most probably already tested in test_kcm.py, if not it belongs there
- ssh cases can be also tested with su and we can put it to test_authentication.py?
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.
LGTM, thanks.
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.
Please talk to Jakub and check the requirement.
AD test for offline authentication fails, I need to check why.
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.
Please add a proper assert messages.
The kcm suite is missing requirement.
Please, rebase on top of current master. |
0285f9b
to
0f394ac
Compare
Ok, the offline authentication test actually did not test offline authenticate at all. There were several issues:
I added bring_offline method and documented it in how to guide (PR SSSD/sssd-test-framework#23): Please change it like this (and update docstring) diff --git a/src/tests/system/tests/test_authentication.py b/src/tests/system/tests/test_authentication.py
index 3f4727867..350783576 100644
--- a/src/tests/system/tests/test_authentication.py
+++ b/src/tests/system/tests/test_authentication.py
@@ -73,7 +73,13 @@ def test_authentication__offline_login(client: Client, provider: GenericProvider
assert not client.auth.parametrize(method).password(user, wrong), "login with wrong password succeeded"
assert client.auth.parametrize(method).password(user, correct), "login with correct password failed"
- provider.firewall.drop(389)
+ # Block KDC, LDAP and Global Catalog ports.
+ provider.firewall.drop([88, 389, 3268])
+
+ # There might be active connections that are not terminated by creating
+ # firewall rule. We need to terminated it by bringing SSSD to offline state
+ # explicitly.
+ client.sssd.bring_offline()
assert client.auth.parametrize(method).password(user, correct), "offline login with correct password failed"
assert not client.auth.parametrize(method).password(user, wrong), "offline login with wrong password succeeded" |
8749b31
to
ad2ad68
Compare
This fails on Samba on rawhide, I can reproduce it locally and will check why. |
It looks to be only timeout issue. SSSD/sssd-test-framework@97a3994 should fix it. Re-running the test. |
@jakub-vavra-cz Can you please review this PR? |
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.
At leats the port blocking should be changed to IP blocking intstead.
Hello @patriki01 , |
Hi, |
All tests passed:
|
ad2ad68
to
d8a599e
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.
LGTM.
Another tests converted.
Simple tests for ssh_login, offline_ssh_login and simple_kinit.
I'd like to read your comments on my code.