getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.
http://docs.getmoto.org/en/latest/
Apache License 2.0
7.66k stars 2.05k forks source link

IAM - Set value of AccountSummary.AccountAccessKeysPresent #8156

Closed zkarpinski closed 1 month ago

zkarpinski commented 1 month ago

Edge case to be able to modify the value of AccountSummary AccountAccessKeysPresent from 0 to 1 and back.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.51%. Comparing base (6c68326) to head (607bb6c). Report is 13 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8156 +/- ## ======================================= Coverage 94.50% 94.51% ======================================= Files 1150 1150 Lines 99203 99224 +21 ======================================= + Hits 93752 93778 +26 + Misses 5451 5446 -5 ``` | [Flag](https://app.codecov.io/gh/getmoto/moto/pull/8156/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | Coverage Δ | | |---|---|---| | [servertests](https://app.codecov.io/gh/getmoto/moto/pull/8156/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `28.79% <50.00%> (-0.01%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/getmoto/moto/pull/8156/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `94.48% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zkarpinski commented 1 month ago

That works for me! Never even thought of that. Stuck in the mindset that the data is protected and we need a function to update it.

That works for me. Any value in modify the tests to show this as an example or nah? I can close this if there's not value.

bblommers commented 1 month ago

Any value in modify the tests to show this as an example or nah?

No, I don't think it's necessary. If someone asks for an example, I can always point them to this PR. :slightly_smiling_face: