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

[Network] Add AppGateway subresource tests #4137

Merged
merged 6 commits into from
Aug 7, 2017
Merged

[Network] Add AppGateway subresource tests #4137

merged 6 commits into from
Aug 7, 2017

Conversation

tjprescott
Copy link
Member

@tjprescott tjprescott commented Aug 3, 2017

Partially addresses #3941.

Fixes issues where --no-wait was not honored for subresource deletes.
Fixes issues with three_state_flag when using custom labels.
Fixes issue where connection draining could not be disabled with http-settings update.


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

  • [N/A] Each command and parameter has a meaningful description.
  • [N/A] Each new command has a test.

(see Authoring Command Modules)

@tjprescott tjprescott added Network az network vnet/lb/nic/dns/etc... Test Framework labels Aug 3, 2017
@tjprescott tjprescott added this to the Sprint 20 milestone Aug 3, 2017
@tjprescott tjprescott requested a review from troydai August 3, 2017 18:35
@codecov-io
Copy link

codecov-io commented Aug 3, 2017

Codecov Report

Merging #4137 into master will increase coverage by 0.33%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4137      +/-   ##
==========================================
+ Coverage   70.54%   70.87%   +0.33%     
==========================================
  Files         437      437              
  Lines       28226    28239      +13     
  Branches     4344     4348       +4     
==========================================
+ Hits        19912    20015     +103     
+ Misses       7017     6879     -138     
- Partials     1297     1345      +48
Impacted Files Coverage Δ
...etwork/azure/cli/command_modules/network/custom.py 62.14% <100%> (+5.81%) ⬆️
...ure-cli-core/azure/cli/core/commands/parameters.py 71.42% <100%> (+0.51%) ⬆️
...twork/azure/cli/command_modules/network/_params.py 93.42% <100%> (ø) ⬆️
...network/azure/cli/command_modules/network/_util.py 82.22% <60%> (+0.82%) ⬆️
...acr/azure/cli/command_modules/acr/_docker_utils.py 21.15% <0%> (-0.85%) ⬇️
...re-cli-dls/azure/cli/command_modules/dls/custom.py 79.59% <0%> (-0.41%) ⬇️
...dback/azure/cli/command_modules/feedback/custom.py 31.25% <0%> (ø) ⬆️
...nent/azure/cli/command_modules/component/custom.py 16.23% <0%> (ø) ⬆️
src/azure-cli-core/azure/cli/core/util.py 70.66% <0%> (ø) ⬆️
...li-cloud/azure/cli/command_modules/cloud/custom.py 13.79% <0%> (ø) ⬆️
... and 2 more

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 e8e4eb5...8da5f12. Read the comment docs.

@tjprescott
Copy link
Member Author

I have incorporated the changes for three_state_flag into the knack conversion branch.

@tjprescott tjprescott requested a review from yugangw-msft August 4, 2017 19:14
@tjprescott
Copy link
Member Author

ping @troydai

else:
values = values or negative_label
if not values:
values = negative_label if invert else positive_label
Copy link
Contributor

Choose a reason for hiding this comment

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

If I got it right, we should do the flip if the values exist, so we need a else

Copy link
Member Author

Choose a reason for hiding this comment

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

From the description of invert it seems we would only invert the flag behavior (i.e. the flag implies false instead of true). @devigned do you concur?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, examining the two cases where this is used, it's clear that we do need to invert the values as well. Thanks for pointing this out!

@@ -432,7 +432,7 @@ def update_ag_backend_http_settings_collection(instance, parent, item_name, port
instance.request_timeout = timeout
if connection_draining_timeout is not None:
instance.connection_draining.enabled = bool(connection_draining_timeout)
instance.connection_draining.drain_timeout_in_sec = connection_draining_timeout
instance.connection_draining.drain_timeout_in_sec = connection_draining_timeout or 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to set 1 when users used 0 to disable the connection_draining? A bit confusing, that you can use 1 to enable; and after you use 0 to disable, but the next read still shows 1 like things not cleaned up. A service side glitch?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. The service will say that it has to be greater than 1 (though ironically it only has to be equal to 1).

@tjprescott
Copy link
Member Author

@yugangw-msft I updated the three_state_flag logic.

@tjprescott tjprescott merged commit 3f474a3 into Azure:master Aug 7, 2017
@tjprescott tjprescott deleted the AppGatewaySubResourceTests branch August 7, 2017 22:07
@haroldrandom haroldrandom added cla-not-required Network az network vnet/lb/nic/dns/etc... Test Framework labels Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required Network az network vnet/lb/nic/dns/etc... Test Framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants