diff options
author | Yunge Zhu <37337818+yungezz@users.noreply.github.com> | 2018-08-30 17:49:06 +0800 |
---|---|---|
committer | Zim Kalinowski <zikalino@microsoft.com> | 2018-08-30 17:49:06 +0800 |
commit | b731732616a6c415debff5070de444b414b989ed (patch) | |
tree | 5d201304127bdf292380409a3da4d91d9e5e5b32 /test/integration/targets/azure_rm_webapp | |
parent | 3b5b15ee5ac42477bb2b4b57b0e47d9ea75e9dc6 (diff) | |
download | ansible-b731732616a6c415debff5070de444b414b989ed.tar.gz |
add azure_rm_webapp_facts module (#43631)
* add webapp facts module
* remove certified
* remove useless argument
* add tests
* return curated output
* add description of return value, move test to webapp folder
* fix lint
* fix lint
* fix lint
* fix test
* fix bug
* fix test, will get all webapp with same tag created by previous test
* fix test
* fix test
* fix test
* add properties description, refine return name
* refine properties, add request_id when exception
* fix bug
* update doc, add publish profile
* fix error
* flatten properties, add option for return publish profile
Diffstat (limited to 'test/integration/targets/azure_rm_webapp')
-rw-r--r-- | test/integration/targets/azure_rm_webapp/aliases | 3 | ||||
-rw-r--r-- | test/integration/targets/azure_rm_webapp/tasks/main.yml | 45 |
2 files changed, 44 insertions, 4 deletions
diff --git a/test/integration/targets/azure_rm_webapp/aliases b/test/integration/targets/azure_rm_webapp/aliases index 1f8f08b099..096fe8493a 100644 --- a/test/integration/targets/azure_rm_webapp/aliases +++ b/test/integration/targets/azure_rm_webapp/aliases @@ -1,3 +1,4 @@ cloud/azure shippable/azure/group4 -destructive
\ No newline at end of file +destructive +azure_rm_webapp_facts
\ No newline at end of file diff --git a/test/integration/targets/azure_rm_webapp/tasks/main.yml b/test/integration/targets/azure_rm_webapp/tasks/main.yml index bd92fea4e2..af4890fd37 100644 --- a/test/integration/targets/azure_rm_webapp/tasks/main.yml +++ b/test/integration/targets/azure_rm_webapp/tasks/main.yml @@ -54,8 +54,22 @@ plan: "{{ win_plan_name }}" dns_registration: true https_only: true + tags: + testwebapptag: test register: output +- name: get web app with resource group and tag + azure_rm_webapp_facts: + resource_group: "{{ resource_group }}" + name: "{{ win_app_name }}3" + tags: + - testwebapptag + register: output + +- assert: + that: + - output.webapps | length == 1 + - name: Create a win web app with java run time specific azure_rm_webapp: resource_group: "{{ resource_group }}" @@ -71,10 +85,22 @@ testkey: "testvalue" register: output -- name: assert the function was created +- name: assert the web app was created assert: that: output.changed +- name: get web app with name + azure_rm_webapp_facts: + resource_group: "{{ resource_group }}" + name: "{{ win_app_name }}4" + register: output + +- assert: + that: + - output.webapps | length == 1 + - output.webapps[0].app_settings | length == 1 + - output.webapps[0].frameworks | length > 1 # there's default frameworks eg net_framework + - name: Update app settings azure_rm_webapp: resource_group: "{{ resource_group }}" @@ -90,10 +116,23 @@ testkey2: "testvalue2" register: output -- name: Assert the web app was created +- name: Assert the web app was updated assert: that: output.changed +- name: get web app with return publishing profile + azure_rm_webapp_facts: + resource_group: "{{ resource_group }}" + name: "{{ win_app_name }}4" + return_publish_profile: true + register: output + +- assert: + that: + - output.webapps | length == 1 + - output.webapps[0].publishing_username != "" + - output.webapps[0].publishing_password != "" + - name: Purge all existing app settings azure_rm_webapp: resource_group: "{{ resource_group }}" @@ -102,7 +141,7 @@ purge_app_settings: true register: output -- name: Assert the web app was created +- name: Assert the web app was updated assert: that: output.changed |