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

Fix delete removes user even if another context is using it #837

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

yardenshoham
Copy link
Contributor

I added a check to make sure that we don't delete a user or a cluster that is in use by another context than the one getting deleted.

I also added a unit test that deletes a context that references a user that is referenced within another context.

I added a check to make sure that we don't delete a user or a cluster that is in use by another context than the one getting deleted.

I also added a unit test that deletes a context that references a user that is referenced within another context.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
@the-label-bot the-label-bot bot added kind/bug Something isn't working size/M size/M labels Jan 6, 2024
Copy link

the-label-bot bot commented Jan 6, 2024

The Label Bot has predicted the following:

Category Value Confidence Applied Label
Kind bug 0.916 ✔️
Size M 0.965 ✔️

Copy link

codecov bot commented Jan 6, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (be591b8) 18.62% compared to head (88d0f7a) 19.18%.
Report is 20 commits behind head on master.

Files Patch % Lines
cmd/delete.go 85.71% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #837      +/-   ##
==========================================
+ Coverage   18.62%   19.18%   +0.56%     
==========================================
  Files          20       20              
  Lines        2201     2220      +19     
==========================================
+ Hits          410      426      +16     
- Misses       1752     1754       +2     
- Partials       39       40       +1     
Flag Coverage Δ
unittests 19.18% <85.71%> (+0.56%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sunny0826 sunny0826 assigned sunny0826 and unassigned sunny0826 Jan 8, 2024
@sunny0826 sunny0826 self-requested a review January 8, 2024 05:51
@sunny0826
Copy link
Owner

Thanks a lot ! I will finish the Review as soon as possible

Copy link
Owner

@sunny0826 sunny0826 left a comment

Choose a reason for hiding this comment

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

🎉 LGTM, Thanks for your contribute !

@sunny0826
Copy link
Owner

@all-contributors please add @yardenshoham for test.

Copy link
Contributor

@sunny0826

I've put up a pull request to add @yardenshoham! 🎉

@sunny0826 sunny0826 merged commit 9f08246 into sunny0826:master Jan 8, 2024
6 checks passed
@yardenshoham yardenshoham deleted the issues/814 branch January 8, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working size/M size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting context removes user even if other context is using it
2 participants