Skip to content

Commit

Permalink
Upddate test case (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun authored Jul 22, 2021
1 parent bd40c1d commit 356c17e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 2 additions & 0 deletions tests/integration/targets/azure_rm_aks/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
rpfx: "{{ resource_group | hash('md5') | truncate(8, True, '') }}"
noderpfx: "{{ resource_group | hash('md5') | truncate(4, True, '') }}"

- include: minimal-cluster.yml

- name: Find available k8s version
azure_rm_aksversion_info:
location: eastus
Expand Down
14 changes: 11 additions & 3 deletions tests/integration/targets/azure_rm_aks/tasks/minimal-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
- set_fact:
rpfx: "{{ resource_group | hash('md5') | truncate(8, True, '') }}"
noderpfx: "{{ resource_group | hash('md5') | truncate(4, True, '') }}"

- name: Find available k8s version
azure_rm_aksversion_info:
location: eastus
register: versions

- name: Use minimal parameters and system-assigned identity
azure_rm_aks:
name: "minimal{{ rpfx }}"
location: eastus
resource_group: "{{ resource_group }}"
kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
dns_prefix: "aks{{ rpfx }}"
agent_pool_profiles:
- name: default
count: 1
vm_size: Standard_DS1_v2
vm_size: Standard_B2s
mode: System
register: output

- name: Assert the AKS instance is well created
Expand All @@ -37,11 +43,13 @@
name: "minimal{{ rpfx }}"
location: eastus
resource_group: "{{ resource_group }}"
kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
dns_prefix: "aks{{ rpfx }}"
agent_pool_profiles:
- name: default
count: 1
vm_size: Standard_DS1_v2
vm_size: Standard_B2s
mode: System
register: output

- name: Assert idempotent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
azure_rm_cosmosdbaccount:
resource_group: "{{ resource_group }}"
name: "{{ dbname }}"
location: eastus
location: eastasia
geo_rep_locations:
- name: eastus
- name: eastasia
failover_priority: 0
database_account_offer_type: Standard
check_mode: yes
Expand All @@ -43,10 +43,10 @@
azure_rm_cosmosdbaccount:
resource_group: "{{ resource_group }}"
name: "{{ dbname }}"
location: eastus
location: eastasia
kind: global_document_db
geo_rep_locations:
- name: eastus
- name: eastasia
failover_priority: 0
- name: westus
failover_priority: 1
Expand All @@ -68,10 +68,10 @@
azure_rm_cosmosdbaccount:
resource_group: "{{ resource_group }}"
name: "{{ dbname }}"
location: eastus
location: eastasia
kind: global_document_db
geo_rep_locations:
- name: eastus
- name: eastasia
failover_priority: 0
- name: westus
failover_priority: 1
Expand All @@ -93,10 +93,10 @@
azure_rm_cosmosdbaccount:
resource_group: "{{ resource_group }}"
name: "{{ dbname }}"
location: eastus
location: eastasia
kind: global_document_db
geo_rep_locations:
- name: eastus
- name: eastasia
failover_priority: 0
- name: westus
failover_priority: 1
Expand Down

0 comments on commit 356c17e

Please sign in to comment.