summaryrefslogtreecommitdiff
path: root/test/integration/targets/azure_rm_functionapp
diff options
context:
space:
mode:
authorZim Kalinowski <zikalino@microsoft.com>2018-03-22 11:58:28 +0800
committerMatt Clay <matt@mystile.com>2018-03-21 20:58:28 -0700
commitfcd75bbc5a9bc33c62c59f301b0fc499589b9508 (patch)
tree4bfe3c2f5dfe0dca744ce86853f9f7b30cc556f7 /test/integration/targets/azure_rm_functionapp
parentc7701fd4acfd39f0b59e751a19a742672befb2aa (diff)
downloadansible-fcd75bbc5a9bc33c62c59f301b0fc499589b9508.tar.gz
fixing function app test (#37687)
Diffstat (limited to 'test/integration/targets/azure_rm_functionapp')
-rw-r--r--test/integration/targets/azure_rm_functionapp/aliases1
-rw-r--r--test/integration/targets/azure_rm_functionapp/tasks/main.yml28
2 files changed, 17 insertions, 12 deletions
diff --git a/test/integration/targets/azure_rm_functionapp/aliases b/test/integration/targets/azure_rm_functionapp/aliases
index b1cd4a5978..9e23ddb721 100644
--- a/test/integration/targets/azure_rm_functionapp/aliases
+++ b/test/integration/targets/azure_rm_functionapp/aliases
@@ -1,2 +1,3 @@
cloud/azure
+posix/ci/cloud/group2/azure
destructive
diff --git a/test/integration/targets/azure_rm_functionapp/tasks/main.yml b/test/integration/targets/azure_rm_functionapp/tasks/main.yml
index c1b9388bbd..35cd102741 100644
--- a/test/integration/targets/azure_rm_functionapp/tasks/main.yml
+++ b/test/integration/targets/azure_rm_functionapp/tasks/main.yml
@@ -1,14 +1,18 @@
+- name: Fix resource prefix
+ set_fact:
+ fixed_resource_prefix: "{{ resource_prefix | replace('-','x') }}"
+
- name: create storage account for function apps
azure_rm_storageaccount:
resource_group: '{{ resource_group }}'
- name: azfunccistor4
+ name: sa{{ fixed_resource_prefix }}
account_type: Standard_LRS
- name: create basic function app
azure_rm_functionapp:
resource_group: '{{ resource_group }}'
- name: azfuncci
- storage_account: azfunccistor4
+ name: af{{ fixed_resource_prefix }}
+ storage_account: sa{{ fixed_resource_prefix }}
register: output
- name: assert the function was created
@@ -18,19 +22,19 @@
- name: list facts for function
azure_rm_functionapp_facts:
resource_group: '{{ resource_group }}'
- name: azfuncci
+ name: af{{ fixed_resource_prefix }}
register: results
- name: assert the facts were retrieved
assert:
that:
- results.ansible_facts.azure_functionapps|length == 1
- - results.ansible_facts.azure_functionapps[0].name == 'azfuncci'
+ - results.ansible_facts.azure_functionapps[0].name == 'af{{ fixed_resource_prefix }}'
- name: delete basic function app
azure_rm_functionapp:
resource_group: '{{ resource_group }}'
- name: azfuncci
+ name: af{{ fixed_resource_prefix }}
state: absent
register: output
@@ -41,8 +45,8 @@
- name: create a function with app settings
azure_rm_functionapp:
resource_group: '{{ resource_group }}'
- name: azfuncci
- storage_account: azfunccistor4
+ name: af{{ fixed_resource_prefix }}
+ storage_account: sa{{ fixed_resource_prefix }}
app_settings:
hello: world
things: more stuff
@@ -55,8 +59,8 @@
- name: change app settings
azure_rm_functionapp:
resource_group: '{{ resource_group }}'
- name: azfuncci
- storage_account: azfunccistor4
+ name: af{{ fixed_resource_prefix }}
+ storage_account: sa{{ fixed_resource_prefix }}
app_settings:
hello: world
things: more stuff
@@ -70,7 +74,7 @@
- name: delete the function app
azure_rm_functionapp:
resource_group: '{{ resource_group }}'
- name: azfuncci
+ name: af{{ fixed_resource_prefix }}
state: absent
register: output
@@ -81,5 +85,5 @@
- name: delete storage account
azure_rm_storageaccount:
resource_group: '{{ resource_group }}'
- name: azfunccistor4
+ name: sa{{ fixed_resource_prefix }}
state: absent