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

adding resource delete tests #53508

Open
wants to merge 11 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@zikalino
Copy link
Contributor

zikalino commented Mar 8, 2019

SUMMARY

Fixing behavior when trying to delete unexisting resource using azure_rm_resource

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm_resource

ADDITIONAL INFORMATION
@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 9, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/cloud/azure/azure_rm_resource.py:272:29: E261 at least two spaces before inline comment

click here for bot help

@zikalino zikalino force-pushed the VSChina:delete-unexisting-resource-problem branch from 60ce5e1 to 55f5816 Mar 20, 2019

@ansibot ansibot removed the stale_ci label Mar 20, 2019

zikalino added some commits Mar 20, 2019

@zikalino zikalino changed the title [WIP] adding resource delete tests adding resource delete tests Mar 20, 2019

@ansibot ansibot added community_review and removed WIP labels Mar 20, 2019

@@ -286,7 +286,7 @@ def exec_module(self, **kwargs):
needs_update = True
response = None

if self.idempotency:
if self.idempotency or self.method == "DELETE":

This comment has been minimized.

@yungezz

yungezz Mar 21, 2019

Contributor

self.idempotency always FALSE. what's the point of it?

This comment has been minimized.

@zikalino

zikalino Mar 21, 2019

Author Contributor

idempotency option is just to enable idempotency check in present state, so i think it shouldn't be necessary to use this option when deleting resource.

- debug:
var: output

- name: Assert that no change was detected

This comment has been minimized.

@yungezz

yungezz Mar 21, 2019

Contributor

shouldn't the delete call fail?

This comment has been minimized.

@zikalino

zikalino Mar 21, 2019

Author Contributor

if resource doesn't exist already and state is set to absent, it shouldn't fail.
this change is to make it consistent with ordinary modules.

@ansibot ansibot removed the needs_triage label Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.