Skip to content

Commit

Permalink
Merge pull request #446 from ykim-1/test/replace_lecacy_compute_region
Browse files Browse the repository at this point in the history
test: replace legacy compute regions in integration tests
  • Loading branch information
ykim-akamai authored Dec 18, 2023
2 parents 4ac3d43 + 1bbd668 commit 510e914
Showing 35 changed files with 105 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-pr.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ on:
inputs:
tests:
description: 'The tests to run.'
required: true
required: false
sha:
description: 'The hash value of the commit.'
required: true
4 changes: 2 additions & 2 deletions tests/integration/targets/firewall_basic/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
- name: Create a Linode Instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/alpine3.17
state: present
@@ -14,7 +14,7 @@
- name: Create another Linode Instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}-2'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/alpine3.17
state: present
4 changes: 2 additions & 2 deletions tests/integration/targets/firewall_device/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode Instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/alpine3.17
state: present
@@ -15,7 +15,7 @@
- name: Create Nodebalancer
linode.cloud.nodebalancer:
label: 'ansible-test-nb-{{ r }}'
region: us-east
region: us-ord
state: present
register: nb

2 changes: 1 addition & 1 deletion tests/integration/targets/firewall_icmp/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
- name: Create a Linode Instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/alpine3.17
state: present
2 changes: 1 addition & 1 deletion tests/integration/targets/image_basic/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create an instance to image
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.16
state: present
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance without set backup to be enabled
linode.cloud.instance:
label: 'ansible-test-not-set-backup-{{ r }}'
region: us-central
region: us-ord
type: g6-standard-1
image: linode/ubuntu22.04
wait: false
16 changes: 8 additions & 8 deletions tests/integration/targets/instance_basic/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance without a root password
linode.cloud.instance:
label: 'ansible-test-nopass-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
private_ip: true
@@ -24,7 +24,7 @@
- name: Create a Linode instance with additional ips and without a root password
linode.cloud.instance:
label: 'ansible-test-additional-ips-nopass-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
private_ip: true
@@ -44,7 +44,7 @@
- name: Update the instance region and type (recreate disallowed)
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-southeast
region: us-ord
group: funny
type: g6-standard-2
image: linode/ubuntu20.04
@@ -57,7 +57,7 @@
- name: Attempt to add additional ips to an instance
linode.cloud.instance:
label: '{{ create_additional_ips.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
private_ip: true
@@ -73,7 +73,7 @@
- name: Attempt to remove additional ips from an instance
linode.cloud.instance:
label: '{{ create_additional_ips.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
private_ip: true
@@ -86,7 +86,7 @@
- name: Update the instance
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-east
region: us-ord
group: funny
type: g6-standard-1
image: linode/ubuntu20.04
@@ -108,7 +108,7 @@
assert:
that:
- info_id.instance.ipv4|length > 1
- info_id.instance.region == 'us-east'
- info_id.instance.region == 'us-ord'
- info_id.configs|length == 1
- info_id.networking.ipv4.public[0].address != None

@@ -121,7 +121,7 @@
assert:
that:
- info_label.instance.ipv4|length > 1
- info_label.instance.region == 'us-east'
- info_label.instance.region == 'us-ord'
- info_label.configs|length == 1

always:
4 changes: 2 additions & 2 deletions tests/integration/targets/instance_booted/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a booted Linode instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
root_pass: Fn$$oobar123
@@ -25,7 +25,7 @@
- name: Power off the instance
linode.cloud.instance:
label: '{{create.instance.label}}'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
root_pass: Fn$$oobar123
14 changes: 7 additions & 7 deletions tests/integration/targets/instance_config_disk/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance with explicit disks and config
linode.cloud.instance:
label: 'ansible-test-dc-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: false
disks:
@@ -55,7 +55,7 @@
- name: Keep the config unchanged
linode.cloud.instance:
label: 'ansible-test-dc-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: false
disks:
@@ -88,7 +88,7 @@
- name: Update the config
linode.cloud.instance:
label: 'ansible-test-dc-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: false
disks:
@@ -123,7 +123,7 @@
- name: Delete the config and resize the disk
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: false
disks:
@@ -142,7 +142,7 @@
- name: Try to update the disk
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: false
disks:
@@ -156,7 +156,7 @@
- name: Try to use conflicting params
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.17
booted: false
@@ -170,7 +170,7 @@
- name: Boot the instance with a new config and disk
linode.cloud.instance:
label: '{{ create.instance.label }}'
region: us-east
region: us-ord
type: g6-standard-1
booted: true
disks:
4 changes: 2 additions & 2 deletions tests/integration/targets/instance_firewall/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
- name: Create a Linode instance attached to the Firewall
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
firewall_id: '{{ firewall_create.firewall.id }}'
wait: false
@@ -48,7 +48,7 @@
- name: Attempt to update the firewall_id for the instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
firewall_id: '{{ firewall_2_create.firewall.id }}'
wait: false
6 changes: 3 additions & 3 deletions tests/integration/targets/instance_interfaces/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance with interface
linode.cloud.instance:
label: 'ansible-test-{{ r }}-i'
region: us-southeast
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
interfaces:
@@ -29,7 +29,7 @@
- name: Update the instance interfaces
linode.cloud.instance:
label: '{{ create_interface.instance.label }}'
region: us-southeast
region: us-ord
group: funny
type: g6-standard-1
image: linode/ubuntu20.04
@@ -52,7 +52,7 @@
- name: Update the instance interfaces
linode.cloud.instance:
label: '{{ create_interface.instance.label }}'
region: us-southeast
region: us-ord
group: funny
type: g6-standard-1
image: linode/ubuntu20.04
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
api_token: '{{ api_token }}'
ua_prefix: '{{ ua_prefix }}'
type: g6-nanode-1
region: us-east
region: us-ord
tags:
- ansible-inventory-node
state: present
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
api_token: '{{ api_token }}'
ua_prefix: '{{ ua_prefix }}'
type: g6-nanode-1
region: us-east
region: us-ord
tags:
- ansible-inventory-node
state: absent
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ types:
tags:
- ansible-inventory-node
regions:
- us-east
- us-ord
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ types:
tags:
- ansible-inventory-node
regions:
- us-east
- us-ord
6 changes: 3 additions & 3 deletions tests/integration/targets/instance_list/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance without a root password
linode.cloud.instance:
label: 'ansible-test-nopass-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
private_ip: true
@@ -35,13 +35,13 @@
order: desc
filters:
- name: region
values: us-east
values: us-ord
register: filter

- assert:
that:
- filter.instances | length >= 1
- filter.instances[0].region == 'us-east'
- filter.instances[0].region == 'us-ord'

always:
- ignore_errors: yes
2 changes: 1 addition & 1 deletion tests/integration/targets/instance_timeout/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create a Linode instance with an immediate timeout
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/ubuntu20.04
wait: yes
2 changes: 1 addition & 1 deletion tests/integration/targets/ip_info/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create an instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.16
wait: no
2 changes: 1 addition & 1 deletion tests/integration/targets/ip_rdns/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create an instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-central
region: us-ord
type: g6-standard-1
image: linode/ubuntu22.04
wait: no
4 changes: 2 additions & 2 deletions tests/integration/targets/ip_share/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
- name: Create an instance to get IPs.
linode.cloud.instance:
label: 'ansible-test-{{ r1 }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.16
wait: false
@@ -18,7 +18,7 @@
- name: Create an instance to be shared with IPs.
linode.cloud.instance:
label: 'ansible-test-{{ r2 }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.16
wait: false
2 changes: 1 addition & 1 deletion tests/integration/targets/ipv6_range_info/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
- name: Create an instance
linode.cloud.instance:
label: 'ansible-test-{{ r }}'
region: us-east
region: us-ord
type: g6-standard-1
image: linode/alpine3.16
wait: no
Loading

0 comments on commit 510e914

Please sign in to comment.