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

Detach principal from thing when it is deleted #2515

Merged
merged 1 commit into from
Oct 24, 2019
Merged

Detach principal from thing when it is deleted #2515

merged 1 commit into from
Oct 24, 2019

Conversation

Sytten
Copy link
Contributor

@Sytten Sytten commented Oct 24, 2019

This fixes #2514

@coveralls
Copy link

coveralls commented Oct 24, 2019

Coverage Status

Coverage decreased (-0.002%) to 93.573% when pulling 2d5e2e9 on Sytten:fix/delete_iot_principal_thing into 3834c74 on spulec:master.

Copy link
Collaborator

@mikegrima mikegrima left a comment

Choose a reason for hiding this comment

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

In your tests, can you add some logic to confirm that the mutations occurred? I.e. can you confirm if the principals were actually detached?

@Sytten
Copy link
Contributor Author

Sytten commented Oct 24, 2019

I can, but it will throw on the last call if the mutations did not occur anyway.

@mikegrima
Copy link
Collaborator

I see so if the code was not there then it would fail anyway?

@Sytten
Copy link
Contributor Author

Sytten commented Oct 24, 2019

Yes, but I added a check. Its a good practice.

Copy link
Collaborator

@mikegrima mikegrima left a comment

Choose a reason for hiding this comment

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

Will merge when tests pass.

@mikegrima mikegrima merged commit 6b67002 into getmoto:master Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IoT Delete Thing should remove the attachment to the principals
3 participants