File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -244,9 +244,8 @@ def test_disk_view(test_linode_instance, test_disk_id):
244244
245245def 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
279278def 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 (
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments