Skip to content
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

Test: housekeeping: test_sss_ssh_knownhosts.py => test_ipa.py #7478

Closed

Conversation

madhuriupadhye
Copy link
Contributor

Added assertion error messages on failures.

@madhuriupadhye
Copy link
Contributor Author

@danlavu what could be the :requirement: here?

Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@danlavu danlavu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a part of housekeeping, we're also clarifying the docs, so it's clear what the test is doing and trimming unnecessary verbiage.

    :title: sss_ssh_knownhosts returns public keys by name
    :setup:
        1. Create IPA host "ssh.ipa.test", public keys and IP resolvable via DNS
        2. Enable ssh responder
        3. Start SSSD
    :steps:
        1. Run "sss_ssh_knownhosts ssh.ipa.test"
    :expectedresults:
        1. All public keys were printed
    :customerscenario: False
   """

can be revised to

    :title: sss_ssh_knownhosts returns public keys by name
    :setup:
        1. Create host with SSH key 
        2. Configure SSSD with SSH responder
        3. Start SSSD
    :steps:
        1. Lookup SSH key
    :expectedresults:
        1. All public keys were printed
    :customerscenario: False
    """
  • The topology is IPA, so saying it's IPA is redundant.
  • Resolvable by DNS, that can be assumed.
  • Actual hostname, it doesn't really add anything to describing what the test does, in actually I think it overly complicates it.

I think one or two sentences at the top describing what the feature does. Question, should this be an IPA test or is it testing the command sss_ssh_knownhostsproxy? From the name I think tools, so that should be the requirement, if you think this more about testing the retrieval of the public host key from IPA, we should change this to test_ipa__hostkeys or something.

src/tests/system/tests/test_sss_ssh_knownhosts.py Outdated Show resolved Hide resolved
@jakub-vavra-cz jakub-vavra-cz added the no-backport This should go to target branch only. label Jul 9, 2024
@madhuriupadhye madhuriupadhye force-pushed the ssh_knowhost_hosekeeping branch 3 times, most recently from e464771 to 89dad7e Compare July 10, 2024 13:20
@madhuriupadhye madhuriupadhye requested a review from danlavu July 10, 2024 13:21
@madhuriupadhye madhuriupadhye changed the title Test: housekeeping: added assertion error messages Test: housekeeping: test_sss_ssh_knownhosts.py => test_ipa.py Jul 10, 2024
Copy link

@danlavu danlavu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, it looks great, thank you!

src/tests/system/tests/test_ipa.py Outdated Show resolved Hide resolved
@madhuriupadhye madhuriupadhye force-pushed the ssh_knowhost_hosekeeping branch from 89dad7e to 6d2f112 Compare July 11, 2024 06:12
@madhuriupadhye madhuriupadhye requested a review from danlavu July 11, 2024 06:13
@alexey-tikhonov
Copy link
Member

All 'system' tests were failing.
@madhuriupadhye, please rebase and check CI results.

Update the docstring of each test.
Update the test case method name.
Added assertion error messages on failures.

Signed-off-by: Madhuri Upadhye <[email protected]>
@madhuriupadhye madhuriupadhye force-pushed the ssh_knowhost_hosekeeping branch from 6d2f112 to a6b7a92 Compare July 24, 2024 15:52
@danlavu
Copy link

danlavu commented Aug 2, 2024

@alexey-tikhonov these have been fixed

@alexey-tikhonov
Copy link
Member

Pushed PR: #7478

  • master
    • 2162317 - Test: housekeeping: test_sss_ssh_knownhosts.py => test_ipa.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport This should go to target branch only. Pushed Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants