Skip to content

Commit cfc0252

Browse files
Account for LKE cluster ACL API change
1 parent dc71975 commit cfc0252

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/models/lke/test_lke.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def lke_cluster(test_linode_client):
4545
cluster.delete()
4646

4747

48-
@pytest.fixture(scope="session")
48+
@pytest.fixture(scope="function")
4949
def lke_cluster_with_acl(test_linode_client):
5050
node_type = test_linode_client.linode.types()[1] # g6-standard-1
5151
version = test_linode_client.lke.versions()[0]
@@ -288,6 +288,7 @@ def test_lke_cluster_acl(lke_cluster_with_acl):
288288

289289
acl = cluster.control_plane_acl_update(
290290
LKEClusterControlPlaneACLOptions(
291+
enabled=True,
291292
addresses=LKEClusterControlPlaneACLAddressesOptions(
292293
ipv4=["10.0.0.2/32"]
293294
)
@@ -309,7 +310,7 @@ def test_lke_cluster_update_acl_null_addresses(lke_cluster_with_acl):
309310
)
310311

311312
assert acl == cluster.control_plane_acl
312-
assert acl.addresses.ipv4 == ["10.0.0.1/32"]
313+
assert acl.addresses.ipv4 == []
313314

314315

315316
def test_lke_cluster_disable_acl(lke_cluster_with_acl):
@@ -325,7 +326,7 @@ def test_lke_cluster_disable_acl(lke_cluster_with_acl):
325326

326327
assert acl.enabled is False
327328
assert acl == cluster.control_plane_acl
328-
assert acl.addresses.ipv4 == ["10.0.0.2/32"]
329+
assert acl.addresses.ipv4 == []
329330

330331
cluster.control_plane_acl_delete()
331332

0 commit comments

Comments
 (0)