Skip to content

Commit 40e3d83

Browse files
Merge pull request #17 from IBM/macsec
chore: fixed integration tests for dl provider and dl
2 parents f740260 + 44a23a3 commit 40e3d83

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/integration/test_direct_link_provider_v2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ def _clean_dl_records(self):
6868
if resp is not None:
6969
for record in resp:
7070
gateway_id = record.get("id")
71-
if ("SDK-PY" in record.get("name")) and (
72-
"delet" not in record.get("operational_status")):
71+
if ("SDK-PY-DL-PROVIDER" in record.get("name")) and (
72+
("delet" not in record.get("operational_status")) and ("progress" not in record.get("operational_status"))):
7373
self.delete_provider_gateway(gateway_id=gateway_id)
7474

75-
#clean up records in client account
75+
#clean up the above deleted records in client account
7676
print("Clean dl records")
7777
response = self.dl.list_gateways()
7878
assert response is not None
@@ -81,9 +81,9 @@ def _clean_dl_records(self):
8181
if resp is not None:
8282
for record in resp:
8383
gateway_id = record.get("id")
84-
if ("SDK-PY" in record.get("name")) and (
84+
if ("SDK-PY-DL-PROVIDER" in record.get("name")) and (
8585
("delet" not in record.get("operational_status")) and ("progress" not in record.get("operational_status"))):
86-
self.delete_gateway(gateway_id=gateway_id)
86+
self.dl.create_gateway_action(id=gateway_id, action="delete_gateway_approve")
8787

8888
def delete_gateway(self, gateway_id):
8989
response = self.dl.create_gateway_action(id=gateway_id, action="delete_gateway_approve")

test/integration/test_direct_link_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def _clean_dl_records(self):
7474
self.delete_connection(gateway_id=gateway_id,
7575
conn_id=conn_record.get("id"))
7676

77-
if ("SDK-PY" in record.get("name")) and (
78-
"delet" not in record.get("operational_status")):
77+
if ("SDK-PY" in record.get("name") and "PROVIDER" not in record.get("name")) and (
78+
("delet" not in record.get("operational_status")) and ("progress" not in record.get("operational_status"))):
7979
self.delete_gateway(gateway_id=gateway_id)
8080

8181
def delete_gateway(self, gateway_id):

0 commit comments

Comments
 (0)