File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
test/integration/models/lke Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 88 Base ,
99 DerivedBase ,
1010 Instance ,
11+ InstanceDiskEncryptionType ,
1112 JSONObject ,
1213 MappedObject ,
1314 Property ,
@@ -422,7 +423,9 @@ def node_pool_create(
422423 ] = None ,
423424 update_strategy : Optional [str ] = None ,
424425 label : str = None ,
425- disk_encryption : Optional [str ] = None ,
426+ disk_encryption : Optional [
427+ Union [str , InstanceDiskEncryptionType ]
428+ ] = None ,
426429 ** kwargs ,
427430 ):
428431 """
@@ -445,8 +448,8 @@ def node_pool_create(
445448 NOTE: This field is specific to enterprise clusters.
446449 :type update_strategy: str
447450 :param disk_encryption: Local disk encryption setting for this LKE node pool.
448- One of 'enabled', or 'disabled'. Defaults to 'disabled'.
449- :type disk_encryption: str
451+ One of 'enabled' or 'disabled'. Defaults to 'disabled'.
452+ :type disk_encryption: str or InstanceDiskEncryptionType
450453 :param kwargs: Any other arguments to pass to the API. See the API docs
451454 for possible values.
452455
Original file line number Diff line number Diff line change @@ -210,18 +210,20 @@ def _to_comparable(p: LKENodePool) -> Dict[str, Any]:
210210 InstanceDiskEncryptionType .disabled ,
211211 )
212212
213+
213214def test_node_pool_create_with_disk_encryption (test_linode_client , lke_cluster ):
214215 node_type = test_linode_client .linode .types ()[1 ]
215216
216217 pool = lke_cluster .node_pool_create (
217218 node_type ,
218219 1 ,
219- disk_encryption = " enabled" ,
220+ disk_encryption = InstanceDiskEncryptionType . enabled ,
220221 )
221222
222- assert pool .disk_encryption == InstanceDiskEncryptionType .enabled
223-
224- pool .delete ()
223+ try :
224+ assert pool .disk_encryption == InstanceDiskEncryptionType .enabled
225+ finally :
226+ pool .delete ()
225227
226228
227229def test_cluster_dashboard_url_view (lke_cluster ):
You can’t perform that action at this time.
0 commit comments