@@ -110,6 +110,31 @@ def lke_cluster_with_labels_and_taints(test_linode_client):
110
110
cluster .delete ()
111
111
112
112
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
+ node_pools = test_linode_client .lke .node_pool ("g6-dedicated-2" , 3 )
120
+ label = get_test_label () + "_cluster"
121
+
122
+ cluster = test_linode_client .lke .cluster_create (
123
+ region ,
124
+ label ,
125
+ node_pools ,
126
+ version ,
127
+ control_plane = LKEClusterControlPlaneOptions (
128
+ high_availability = True ,
129
+ ),
130
+ apl_enabled = True ,
131
+ )
132
+
133
+ yield cluster
134
+
135
+ cluster .delete ()
136
+
137
+
113
138
def get_cluster_status (cluster : LKECluster , status : str ):
114
139
return cluster ._raw_json ["status" ] == status
115
140
@@ -328,6 +353,19 @@ def test_lke_cluster_labels_and_taints(lke_cluster_with_labels_and_taints):
328
353
assert LKENodePoolTaint .from_json (updated_taints [1 ]) in pool .taints
329
354
330
355
356
+ @pytest .mark .flaky (reruns = 3 , reruns_delay = 2 )
357
+ def test_lke_cluster_with_apl (lke_cluster_with_apl ):
358
+ assert lke_cluster_with_apl .apl_enabled == True
359
+ assert (
360
+ lke_cluster_with_apl .apl_console_url
361
+ == f"https://console.lke{ lke_cluster_with_apl .id } .akamai-apl.net"
362
+ )
363
+ assert (
364
+ lke_cluster_with_apl .apl_health_check_url
365
+ == f"https://auth.lke{ lke_cluster_with_apl .id } .akamai-apl.net/ready"
366
+ )
367
+
368
+
331
369
def test_lke_types (test_linode_client ):
332
370
types = test_linode_client .lke .types ()
333
371
0 commit comments