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.6k stars 2.03k forks source link

[BUG FIX] route53 list_tags_for_resources no results & hostedzone ids not decoding properly #8131

Closed zkarpinski closed 1 week ago

zkarpinski commented 1 week ago

Resolves #8130

Adds additional test scenarios

zkarpinski commented 1 week ago

Hey @bblommers Not sure why this is failing with an empty list of tags in ServerMode. Hoping you can take a look when you have a chance.

bblommers commented 1 week ago

Hi @zkarpinski! The failing test was because of another encoding issue. In ServerMode, the URL comes already unquoted, so we have to handle both cases:

/2013-04-01/tags/hostedzone//hostedzone/PNOBIQEFOI7M961        # ServerMode
/2013-04-01/tags/hostedzone/%2Fhostedzone%2F6ZT6E5GX46CTE59    # Regular decorators

I've pushed a change that should fix this.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.49%. Comparing base (b95bfe9) to head (6a33ebb). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
moto/route53/responses.py 88.88% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8131 +/- ## ========================================== - Coverage 94.49% 94.49% -0.01% ========================================== Files 1150 1150 Lines 99025 99032 +7 ========================================== + Hits 93571 93577 +6 - Misses 5454 5455 +1 ``` | [Flag](https://app.codecov.io/gh/getmoto/moto/pull/8131/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/8131/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `28.81% <14.28%> (-0.01%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/getmoto/moto/pull/8131/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `94.46% <92.85%> (-0.01%)` | :arrow_down: | 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.