Skip to content

Commit 257cb72

Browse files
authored
Update LA Disk Encryption Capability (#760)
1 parent 3f7f52b commit 257cb72

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

tests/integration/linodes/test_linodes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,8 @@ def test_disk_view(test_linode_instance, test_disk_id):
244244

245245
def test_create_linode_disk_encryption_enabled(linode_cloud_firewall):
246246
test_region = get_random_region_with_caps(
247-
required_capabilities=["Linodes", "Disk Encryption"]
247+
required_capabilities=["Linodes", "LA Disk Encryption"]
248248
)
249-
250249
linode_id = create_linode(
251250
firewall_id=linode_cloud_firewall,
252251
disk_encryption=True,
@@ -278,7 +277,7 @@ def test_create_linode_disk_encryption_enabled(linode_cloud_firewall):
278277

279278
def test_create_linode_disk_encryption_disabled(linode_cloud_firewall):
280279
test_region = get_random_region_with_caps(
281-
required_capabilities=["Linodes", "Disk Encryption"]
280+
required_capabilities=["Linodes", "LA Disk Encryption"]
282281
)
283282

284283
linode_id = create_linode(

tests/integration/lke/test_clusters.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,31 @@ def test_create_node_pool_default_to_disk_encryption_enabled(test_lke_cluster):
422422
"g6-standard-4",
423423
"--text",
424424
"--format=id,disk_encryption,type",
425-
"--no-headers",
425+
# "--no-headers",
426426
]
427427
)
428428
.stdout.decode()
429429
.rstrip()
430430
)
431+
lines = result.splitlines()
432+
headers = lines[0].split()
433+
values = lines[1].split()
434+
435+
# Build a dict for easier access
436+
pool_info = dict(zip(headers, values))
437+
438+
disk_encryption_status = pool_info.get("disk_encryption")
431439

432-
assert "enabled" in result
433-
assert "g6-standard-4" in result
440+
if disk_encryption_status == "enabled":
441+
print("Disk encryption is enabled by default.")
442+
elif disk_encryption_status == "disabled":
443+
print(
444+
"Disk encryption is supported in this region but not enabled by default."
445+
)
446+
else:
447+
raise AssertionError(
448+
f"Unexpected disk_encryption status: {disk_encryption_status}"
449+
)
434450

435451

436452
@pytest.fixture

0 commit comments

Comments
 (0)