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

Tests: convert multihost/alltests/test_cache_testing to system/memory_cache #7103

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

patriki01
Copy link
Contributor

@patriki01 patriki01 commented Dec 20, 2023

Converted another bunch of tests.

@patriki01 patriki01 force-pushed the cache_testing branch 2 times, most recently from c2e2088 to e4034f9 Compare December 21, 2023 09:26
@patriki01 patriki01 marked this pull request as ready for review December 21, 2023 10:56
@jakub-vavra-cz jakub-vavra-cz self-assigned this Jan 2, 2024
@jakub-vavra-cz jakub-vavra-cz self-requested a review January 2, 2024 08:45
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

@alexey-tikhonov
Copy link
Member

alexey-tikhonov commented Jan 17, 2024

I know this is merely a port of 821455c that in turn is a port of bash(?) tests, but:

  • none of tests seems to have anything to do with 'memory cache' (as prefix suggests)
  • tests tend to rely on internal implementation details too much, imo
  • tests descriptions don't describe what is being tested in plain words but rather retell code
  • too many overlaps (in particular, it doesn't make sense to run those tests against all providers)
  • I would suggest starting with a testing plan - "Testing of persistent caching" - describing use cases based on documentation, and then covered those cases

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.

Most of the tests overlap

https://github.com/SSSD/sssd/blob/master/src/tests/system/tests/test_sss_cache.py

Except the last two tests and those I think should be consolidated into one so it's cleaner. More detail in the comments.

Not part of this PR, but a note.

What we are missing is the functional part of the cache tests. We have one test that sort of does it.

test_authentication__offline_login

It configures parameters and doesn't use the default. We should always have a vanilla functional test.

src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_memory_cache.py Outdated Show resolved Hide resolved
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.

I've been doing some house keeping/auditing of tests in the new test frame. Please take a look at this pull request, #7160

A lot of tests that you have ported, thank you for porting them. They're going to be renamed and need to be re-evaulted because it may have been a poor test case to begin with.

src/tests/system/tests/test_sss_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_sss_cache.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_sss_cache.py Outdated Show resolved Hide resolved
@patriki01 patriki01 force-pushed the cache_testing branch 3 times, most recently from 666a1f5 to 3c6b265 Compare February 15, 2024 07:39
@alexey-tikhonov alexey-tikhonov removed their assignment Feb 15, 2024
@danlavu danlavu merged commit 23afc3b into SSSD:master Apr 11, 2024
31 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants