Skip to content

Commit 77dde13

Browse files
authored
test: Add cloud firewalls to migration tests and improve wait times to 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
1 parent dddecc8 commit 77dde13

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

test/integration/models/linode/test_linode.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ def linode_for_disk_tests(test_linode_client, e2e_test_firewall):
107107
# Provisioning time
108108
wait_for_condition(10, 300, get_status, linode_instance, "running")
109109

110-
linode_instance.shutdown()
110+
send_request_when_resource_available(300, linode_instance.shutdown)
111111

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

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

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

515515

516-
def test_linode_initate_migration(test_linode_client):
516+
def test_linode_initate_migration(test_linode_client, e2e_test_firewall):
517517
client = test_linode_client
518518
available_regions = client.regions()
519519
chosen_region = available_regions[4]
520520
label = get_test_label() + "_migration"
521521

522522
linode, _ = client.linode.instance_create(
523-
"g6-nanode-1", chosen_region, image="linode/debian12", label=label
523+
"g6-nanode-1",
524+
chosen_region,
525+
image="linode/debian12",
526+
label=label,
527+
firewall=e2e_test_firewall,
524528
)
525529

526530
# Says it could take up to ~6 hrs for migration to fully complete
527531
send_request_when_resource_available(
528532
300,
529533
linode.initiate_migration,
530-
region="us-mia",
534+
region="us-central",
531535
migration_type=MigrationType.COLD,
532536
)
533537

0 commit comments

Comments
 (0)