Skip to content

Commit

Permalink
test: Add cloud firewalls to migration tests and improve wait times t…
Browse files Browse the repository at this point in the history
…o disk related tests (#460)

* Add proper wait times in fixture for disk related tests; Add cloud firewall to migration test

* unskipping migration test after LDE enabled on specified region
  • Loading branch information
ykim-akamai authored Sep 26, 2024
1 parent dddecc8 commit 77dde13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/integration/models/linode/test_linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def linode_for_disk_tests(test_linode_client, e2e_test_firewall):
# Provisioning time
wait_for_condition(10, 300, get_status, linode_instance, "running")

linode_instance.shutdown()
send_request_when_resource_available(300, linode_instance.shutdown)

wait_for_condition(10, 100, get_status, linode_instance, "offline")

# Now it allocates 100% disk space hence need to clear some space for tests
linode_instance.disks[1].delete()
send_request_when_resource_available(300, linode_instance.disks[1].delete)

test_linode_client.polling.event_poller_create(
"linode", "disk_delete", entity_id=linode_instance.id
Expand Down Expand Up @@ -513,21 +513,25 @@ def test_linode_ips(create_linode):
assert ips.ipv4.public[0].address == linode.ipv4[0]


def test_linode_initate_migration(test_linode_client):
def test_linode_initate_migration(test_linode_client, e2e_test_firewall):
client = test_linode_client
available_regions = client.regions()
chosen_region = available_regions[4]
label = get_test_label() + "_migration"

linode, _ = client.linode.instance_create(
"g6-nanode-1", chosen_region, image="linode/debian12", label=label
"g6-nanode-1",
chosen_region,
image="linode/debian12",
label=label,
firewall=e2e_test_firewall,
)

# Says it could take up to ~6 hrs for migration to fully complete
send_request_when_resource_available(
300,
linode.initiate_migration,
region="us-mia",
region="us-central",
migration_type=MigrationType.COLD,
)

Expand Down

0 comments on commit 77dde13

Please sign in to comment.