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

NetworkManager: Update resource states to 'AVAILABLE' from 'PENDING' after create response #8132

Closed zkarpinski closed 1 month ago

zkarpinski commented 1 month ago

For NetworkManager: Update resource states to 'AVAILABLE' from 'PENDING' after create response to more accurately represent the mocked resource

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 94.49%. Comparing base (b95bfe9) to head (73eccba). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8132 +/- ## ======================================= Coverage 94.49% 94.49% ======================================= Files 1150 1150 Lines 99025 99038 +13 ======================================= + Hits 93571 93584 +13 Misses 5454 5454 ``` | [Flag](https://app.codecov.io/gh/getmoto/moto/pull/8132/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/8132/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `28.81% <5.55%> (-0.01%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/getmoto/moto/pull/8132/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `94.46% <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.

bblommers commented 1 month ago

Probably not necessary but I think you could use the Managed State model here if you wanted

That is true, @mattheidelbaugh, that would achieve the same result. For this scenario, with only one immediate transition, the current implementation is probably the simplest, so I'm happy with that.

Thanks for the PR @zkarpinski!