Skip to content

Commit 44b0454

Browse files
committed
Add copilot suggestions
1 parent 9561879 commit 44b0454

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

test/integration/models/linode/test_linode.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def linode_with_disk_encryption(test_linode_client, request):
236236

237237

238238
@pytest.fixture(scope="session")
239-
def create_linode_with_authorization_key(test_linode_client, e2e_test_firewall):
239+
def create_linode_with_authorized_key(test_linode_client, ssh_key_gen):
240240
client = test_linode_client
241241

242242
region = get_region(client, {"Linodes", "Cloud Firewall"}, site_type="core")
@@ -247,9 +247,9 @@ def create_linode_with_authorization_key(test_linode_client, e2e_test_firewall):
247247
region,
248248
image="linode/debian12",
249249
label=label,
250-
kernel="linode/6.15.7-x86_64-linode169",
250+
kernel="linode/latest-64bit",
251251
boot_size=9000,
252-
authorized_keys="ssh-rsa",
252+
authorized_keys=ssh_key_gen[0],
253253
)
254254

255255
yield linode_instance
@@ -1197,8 +1197,8 @@ def test_expected_error_if_fields_authorized_users_authorized_keys_root_pass_are
11971197
region,
11981198
image="linode/debian12",
11991199
label=label,
1200-
kernel="linode/6.15.7-x86_64-linode169",
1201-
boot_size="9000",
1200+
kernel="linode/latest-64bit",
1201+
boot_size=9000,
12021202
)
12031203
assert (
12041204
"When creating an Instance from an Image, at least one of root_pass, authorized_users, or authorized_keys must be provided."
@@ -1207,9 +1207,10 @@ def test_expected_error_if_fields_authorized_users_authorized_keys_root_pass_are
12071207

12081208

12091209
def test_create_linode_with_kernel_and_boot_size_then_add_disk_and_rebuild(
1210-
create_linode_with_authorization_key,
1210+
create_linode_with_authorized_key,
1211+
ssh_key_gen,
12111212
):
1212-
linode_create = create_linode_with_authorization_key
1213+
linode_create = create_linode_with_authorized_key
12131214
assert linode_create.image.id == "linode/debian12"
12141215

12151216
wait_for_condition(10, 300, get_status, linode_create, "running")
@@ -1228,8 +1229,9 @@ def test_create_linode_with_kernel_and_boot_size_then_add_disk_and_rebuild(
12281229
3,
12291230
linode_create.rebuild,
12301231
"linode/debian12",
1231-
authorized_keys="ecdsa-sha2-nistp",
1232+
authorized_keys=ssh_key_gen[0],
12321233
)
12331234
wait_for_condition(10, 300, get_status, linode_create, "rebuilding")
12341235
assert linode_create.status == "rebuilding"
1236+
wait_for_condition(10, 300, get_status, linode_create, "running")
12351237
assert linode_create.image.id == "linode/debian12"

0 commit comments

Comments
 (0)