Skip to content

Commit 64965cf

Browse files
committed
fixes integration tests
1 parent 69ecbea commit 64965cf

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

test/e2e/ip_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ def get(
5656
try:
5757
resp = c.get_ip_set(Name=name, Id=id, Scope=scope)
5858
return resp["IPSet"]
59-
except c.exceptions.BadRequestException:
59+
except c.exceptions.WAFNonexistentItemException:
6060
return None

test/e2e/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
acktest @ git+https://github.com/aws-controllers-k8s/test-infra.git@66d07f4daa2ce12d92f07cb332d5342a0aea4feb
1+
acktest @ git+https://github.com/aws-controllers-k8s/test-infra.git@3aedc6b0bf8bbcfdaf0bddb322d5c6adf04c329a

test/e2e/tests/test_ip_set.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ def test_crud(self, simple_ip_set):
8080
ip_set_name = cr["spec"]["name"]
8181

8282
assert "status" in cr
83-
assert "ackResourceMetadata" in cr["status"]
84-
assert "arn" in cr["status"]["ackResourceMetadata"]
85-
ip_set_id = cr["status"]["ackResourceMetadata"]["id"]
83+
assert "id" in cr["status"]
84+
ip_set_id = cr["status"]["id"]
8685

8786
latest = ip_set.get(ip_set_name, ip_set_id)
8887
assert latest is not None
@@ -95,8 +94,10 @@ def test_crud(self, simple_ip_set):
9594

9695
# update the CR
9796
updates = {
98-
"spec": {"addresses": [addresses[0], addresses[1], "192.0.0.0/16"]},
99-
"spec": {"description": "updated description"},
97+
"spec": {
98+
"addresses": [addresses[0], addresses[1], "192.0.0.0/16"],
99+
"description": "updated description",
100+
},
100101
}
101102
k8s.patch_custom_resource(ref, updates)
102103
time.sleep(MODIFY_WAIT_SECONDS)
@@ -111,5 +112,6 @@ def test_crud(self, simple_ip_set):
111112
assert description == "updated description"
112113

113114
# delete the CR
114-
simple_ip_set
115-
ip_set.wait_until_deleted(ip_set_name)
115+
_, deleted = k8s.delete_custom_resource(ref, DELETE_WAIT_SECONDS)
116+
assert deleted
117+
ip_set.wait_until_deleted(ip_set_name, ip_set_id)

0 commit comments

Comments
 (0)