@@ -110,6 +110,32 @@ def lke_cluster_with_labels_and_taints(test_linode_client):
110110 cluster .delete ()
111111
112112
113+ @pytest .fixture (scope = "session" )
114+ def lke_cluster_with_apl (test_linode_client ):
115+ version = test_linode_client .lke .versions ()[0 ]
116+
117+ region = get_region (test_linode_client , {"Kubernetes" , "Disk Encryption" })
118+
119+ # NOTE: g6-dedicated-4 is the minimum APL-compatible Linode type
120+ node_pools = test_linode_client .lke .node_pool ("g6-dedicated-4" , 3 )
121+ label = get_test_label () + "_cluster"
122+
123+ cluster = test_linode_client .lke .cluster_create (
124+ region ,
125+ label ,
126+ node_pools ,
127+ version ,
128+ control_plane = LKEClusterControlPlaneOptions (
129+ high_availability = True ,
130+ ),
131+ apl_enabled = True ,
132+ )
133+
134+ yield cluster
135+
136+ cluster .delete ()
137+
138+
113139def get_cluster_status (cluster : LKECluster , status : str ):
114140 return cluster ._raw_json ["status" ] == status
115141
@@ -328,6 +354,19 @@ def test_lke_cluster_labels_and_taints(lke_cluster_with_labels_and_taints):
328354 assert LKENodePoolTaint .from_json (updated_taints [1 ]) in pool .taints
329355
330356
357+ @pytest .mark .flaky (reruns = 3 , reruns_delay = 2 )
358+ def test_lke_cluster_with_apl (lke_cluster_with_apl ):
359+ assert lke_cluster_with_apl .apl_enabled == True
360+ assert (
361+ lke_cluster_with_apl .apl_console_url
362+ == f"https://console.lke{ lke_cluster_with_apl .id } .akamai-apl.net"
363+ )
364+ assert (
365+ lke_cluster_with_apl .apl_health_check_url
366+ == f"https://auth.lke{ lke_cluster_with_apl .id } .akamai-apl.net/ready"
367+ )
368+
369+
331370def test_lke_types (test_linode_client ):
332371 types = test_linode_client .lke .types ()
333372
0 commit comments