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

fixed tf tests: TestAccRoute53HealthCheck #5241

Merged
merged 2 commits into from Jun 19, 2022

Conversation

macnev2013
Copy link
Contributor

TF Tests

  • TestAccRoute53HealthCheck_basic
  • TestAccRoute53HealthCheck_tags
  • TestAccRoute53HealthCheck_withSearchString
  • TestAccRoute53HealthCheck_withChildHealthChecks
  • TestAccRoute53HealthCheck_withHealthCheckRegions
  • TestAccRoute53HealthCheck_ip
  • TestAccRoute53HealthCheck_ipv6
  • TestAccRoute53HealthCheck_cloudWatchAlarmCheck
  • TestAccRoute53HealthCheck_withSNI
  • TestAccRoute53HealthCheck_disabled
  • TestAccRoute53HealthCheck_withRoutingControlARN
  • TestAccRoute53HealthCheck_disappears

Fixed

  • CreateHealthCheck

Added

  • UpdateHealthCheck

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2022

Codecov Report

Merging #5241 (217d663) into master (58edb5b) will decrease coverage by 0.05%.
The diff coverage is 30.35%.

@@            Coverage Diff             @@
##           master    #5241      +/-   ##
==========================================
- Coverage   95.87%   95.82%   -0.06%     
==========================================
  Files         688      688              
  Lines       68426    68484      +58     
==========================================
+ Hits        65603    65622      +19     
- Misses       2823     2862      +39     
Flag Coverage Δ
servertests 36.31% <10.71%> (-0.02%) ⬇️
unittests 95.76% <30.35%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
moto/route53/urls.py 85.71% <ø> (ø)
moto/route53/models.py 85.62% <28.26%> (-6.33%) ⬇️
moto/route53/responses.py 85.52% <40.00%> (-1.73%) ⬇️
moto/secretsmanager/models.py 98.61% <0.00%> (+0.01%) ⬆️
moto/secretsmanager/exceptions.py 97.05% <0.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58edb5b...217d663. Read the comment docs.

self.caller_reference = caller_reference

def add_children(self, children):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The name set_children would be more accurate, as it doesn't add anything to the existing list of children

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Updated

self.children = [children]
else:
self.children = None
return self.children
Copy link
Collaborator

Choose a reason for hiding this comment

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

The return value is not used anywhere, as far as I can tell, so we can remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. Missed it. Thanks for pointing out.

elif children and isinstance(children, str):
self.children = [children]
else:
self.children = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this desired behaviour?
When calling update_healthcheck without the children-argument, this removes any existing children. It seems more intuitive to keep the existing children, if the user doesn't explicitly say they want to change/update them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. if calling update_healthcheck without --child-health-checks argument - its not removing any children. Fixed this.

But it will overwrite all children if --child-health-checks argument is present with valid children.

moto/route53/models.py Outdated Show resolved Hide resolved
moto/route53/models.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Thanks @macnev2013!

@bblommers bblommers merged commit 4818692 into getmoto:master Jun 19, 2022
@bblommers bblommers added this to the 3.1.14 milestone Jun 19, 2022
@github-actions
Copy link
Contributor

This is now part of moto >= 3.1.14.dev19

whummer pushed a commit to localstack/moto that referenced this pull request Jun 22, 2022
viren-nadkarni pushed a commit to localstack/moto that referenced this pull request Jun 30, 2022
sahilshah6196 pushed a commit to EBSCOIS/moto that referenced this pull request Jul 1, 2022
viren-nadkarni pushed a commit to localstack/moto that referenced this pull request Jul 4, 2022
viren-nadkarni pushed a commit to localstack/moto that referenced this pull request Jul 12, 2022
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.

None yet

3 participants