Skip to content

Commit

Permalink
ACA-1603: Adding verefication to ensure Load Balancer was created as …
Browse files Browse the repository at this point in the history
…expected

Signed-off-by: hyaish <[email protected]>
  • Loading branch information
Yaish25491 committed Jul 11, 2024
1 parent 6669852 commit d91e049
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- Adding testing to ensure Load Balancer was created as expected

Check failure on line 3 in changelogs/fragments/20240710-test_azure_load_balancer_with_public_ip.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[empty-lines]

Too many blank lines (1 > 0)
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@
name: "{{ load_balancer_name }}"
resource_group: "{{ test_resource_group }}"
register: _loadbalancer

- name: Creating loadbalancer_id for loadbalancer creation test
ansible.builtin.set_fact:
loadbalancer_id: "/subscriptions/{{ azure_subscription_id }}/resourceGroups/{{ test_resource_group }}/providers/Microsoft.Network/loadBalancers/{{ load_balancer_name }}"

- name: Ensure Load Balancer was created as expected
ansible.builtin.assert:
that:
- _loadbalancer.loadbalancers | length == 1

- _loadbalancer.loadbalancers[0].name == load_balancer_name
- _loadbalancer.loadbalancers[0].id == loadbalancer_id
- _loadbalancer.loadbalancers[0].sku.name == load_balancer_sku

- name: Gather Public IP info
azure.azcollection.azure_rm_publicipaddress_info:
name: "{{ load_balancer_public_ip_name }}"
Expand Down

0 comments on commit d91e049

Please sign in to comment.