Add test for user and password hash deletion after silo delete#10400
Open
izuzak wants to merge 1 commit intooxidecomputer:mainfrom
Open
Add test for user and password hash deletion after silo delete#10400izuzak wants to merge 1 commit intooxidecomputer:mainfrom
izuzak wants to merge 1 commit intooxidecomputer:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! 👋 After getting the tests to run, I wanted to dip my toes into the codebase by implementing a TODO from the code.
This PR implements a small test coverage TODO from nexus/tests/integration_tests/password_login.rs:
Initially, I added the test to that same
integration_tests/password_login.rsfile, but later realized that there were a few other after-silo-delete cleanup tests inintegration_tests/silos.rsso I moved the test there. Happy to move it back tointegration_tests/password_login.rsif that wasn't the right call.I think I understood what the TODO proposed and, after reading about soft deletions and password hashes, and after looking at tests like
test_silo_delete_clean_up_groups, I came up with this rough idea:I'm curious if testing both is too much (directly fetching users and listing all silo users) -- I added both since they take different paths and might catch different problems. Happy to simplify if one of these feels unnecessary. 💭
Other than the test, I added a
delete_silohelper innexus/test-utils/src/resource_helpers.rssimilar to thecreate_silohelper that was already there. And then used the new helper in a bunch of tests inintegration_tests/silos.rs.Since this is just a small test coverage TODO, it's far from urgent in terms of review (and I know you all are super busy). Still, to avoid it being completely missed, I'll give a friendly cc to @davepacheco who wrote the original TODO in #1841. ✌️