Skip to content

test: fixed the connect test cases for directlink and updated the secrets baseline for directlink #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 66 additions & 19 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "package-lock.json|^.secrets.baseline$",
"lines": null
},
"generated_at": "2021-03-09T20:23:57Z",
"generated_at": "2021-10-13T19:20:12Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand All @@ -25,6 +25,7 @@
"name": "CloudantDetector"
},
{
"ghe_instance": "github.ibm.com",
"name": "GheDetector"
},
{
Expand Down Expand Up @@ -69,7 +70,7 @@
"hashed_secret": "6bc64a0a61d9b2e65803729327d1f82e9f96ea58",
"is_secret": false,
"is_verified": false,
"line_number": 177,
"line_number": 178,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -79,15 +80,15 @@
"hashed_secret": "9a49206d9befa62415e39b8246e09071b9dc81b3",
"is_secret": false,
"is_verified": false,
"line_number": 131,
"line_number": 132,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "6bc64a0a61d9b2e65803729327d1f82e9f96ea58",
"is_secret": false,
"is_verified": false,
"line_number": 132,
"line_number": 133,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -97,7 +98,7 @@
"hashed_secret": "1c785edec135c83b186cde8149c9883532f6f1d1",
"is_secret": false,
"is_verified": false,
"line_number": 200,
"line_number": 201,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -107,7 +108,7 @@
"hashed_secret": "9fb6a20c3e23ac01a480765a3e4246e05c6769d2",
"is_secret": false,
"is_verified": false,
"line_number": 102,
"line_number": 104,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -117,7 +118,7 @@
"hashed_secret": "ece6e4a51cf5a18845f07c95832586a96d5fcf4c",
"is_secret": false,
"is_verified": false,
"line_number": 104,
"line_number": 105,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -134,26 +135,26 @@
],
"test/unit/test_direct_link_provider_v2.py": [
{
"hashed_secret": "8cff7739d641fa350594fe96091ff06c8b66fa30",
"hashed_secret": "c690fcc1554f0eb5b865d7f09c9ceda156df2a80",
"is_secret": false,
"is_verified": false,
"line_number": 717,
"line_number": 729,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "c2ea1b20b8c055f4640059ebef5046491c20f00e",
"is_secret": false,
"is_verified": false,
"line_number": 799,
"line_number": 811,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "4c154143659305d3cea695447bc2947935d294d0",
"is_secret": false,
"is_verified": false,
"line_number": 1000,
"line_number": 1012,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -163,23 +164,23 @@
"hashed_secret": "94851979e1cb78bbd9e48a9e2a01f7485e2dbf37",
"is_secret": false,
"is_verified": false,
"line_number": 2286,
"line_number": 3567,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "4c154143659305d3cea695447bc2947935d294d0",
"is_secret": false,
"is_verified": false,
"line_number": 2623,
"line_number": 3907,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "d67a00cdeec75b04602db35a89c15bb6ee53c877",
"is_secret": false,
"is_verified": false,
"line_number": 2858,
"line_number": 4422,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -202,6 +203,29 @@
"verified_result": null
}
],
"test/unit/test_filters_v1.py": [
{
"hashed_secret": "5dde7ada70036e084f259d9d571d63a8123f74be",
"is_verified": false,
"line_number": 893,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "d734568d91468a08d988dc4b2f09ae9c120d0368",
"is_verified": false,
"line_number": 1036,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "66d6a25c558abd33ace6420a8710e1c00e2d8a0e",
"is_verified": false,
"line_number": 1111,
"type": "Hex High Entropy String",
"verified_result": null
}
],
"test/unit/test_firewall_access_rules_v1.py": [
{
"hashed_secret": "fbf087ed5f01eee2bc96b8b32fa2e439ac34c5bd",
Expand All @@ -220,6 +244,29 @@
"verified_result": null
}
],
"test/unit/test_firewall_rules_v1.py": [
{
"hashed_secret": "0e0185981368730440e3e7e1c2d4aac4318c8808",
"is_verified": false,
"line_number": 1064,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "66d6a25c558abd33ace6420a8710e1c00e2d8a0e",
"is_verified": false,
"line_number": 1278,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "eaf07e046263e59dad24af9b4f5df034aa0bc10c",
"is_verified": false,
"line_number": 1284,
"type": "Hex High Entropy String",
"verified_result": null
}
],
"test/unit/test_global_load_balancer_events_v1.py": [
{
"hashed_secret": "fbf087ed5f01eee2bc96b8b32fa2e439ac34c5bd",
Expand Down Expand Up @@ -353,15 +400,15 @@
"hashed_secret": "d67a00cdeec75b04602db35a89c15bb6ee53c877",
"is_secret": false,
"is_verified": false,
"line_number": 1253,
"line_number": 1632,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "eb74ff42e2e8dfbaf3e4f64a02cdadc8bedda8c3",
"is_secret": false,
"is_verified": false,
"line_number": 1343,
"line_number": 1815,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand Down Expand Up @@ -497,15 +544,15 @@
"hashed_secret": "ef721aec71abce87f596e22daa5e80b2785f1b85",
"is_secret": false,
"is_verified": false,
"line_number": 6775,
"line_number": 7014,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "e8149f1568ca067368f5fd5fab60e8db3662b78e",
"is_secret": false,
"is_verified": false,
"line_number": 6778,
"line_number": 7017,
"type": "Base64 High Entropy String",
"verified_result": null
}
Expand All @@ -521,7 +568,7 @@
}
]
},
"version": "0.13.1+ibm.31.dss",
"version": "0.13.1+ibm.46.dss",
"word_list": {
"file": null,
"hash": null
Expand Down
36 changes: 21 additions & 15 deletions test/integration/test_direct_link_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ def delete_connection(self, gateway_id, conn_id):
time.sleep(10)
count += 1

def get_port_id(self):
# Fetch the list of ports and use a port to create a connect gateway
response = self.dl.list_ports()
assert response is not None

ports = response.get_result().get("ports")
port_id = ""
provider_to_be_used = "DL2-TEST"
for port in ports:
if provider_to_be_used in port.get("provider_name"):
port_id = port.get("id")
break

return port_id

################## DirectLink Gateways ######################################

def test_gateway_crud_actions(self):
Expand Down Expand Up @@ -515,11 +530,8 @@ def test_connect_gateway_with_connection_mode(self):
connectionMode = "direct"

""" test create/update/delete gateway with connection_mode success """
# FEtch the list of ports and use a port to create a connect gateway
response = self.dl.list_ports()
assert response is not None

port_id = response.get_result().get("ports")[0].get("id")
# Get the port id to create a connect gateway
port_id = self.get_port_id()

# create gateway with connection_mode as transit
gwPort = GatewayPortIdentity(id= port_id)
Expand Down Expand Up @@ -639,11 +651,8 @@ def test_connect_gateway_with_bgp_ip_update(self):
gatewayType = "connect"

""" test create/update/delete gateway with bgp_asn bgp_cer_cidr bgp_ibm_cidr success """
# Fetch the list of ports and use a port to create a connect gateway
response = self.dl.list_ports()
assert response is not None

port_id = response.get_result().get("ports")[0].get("id")
# Get the port id to create a connect gateway
port_id = self.get_port_id()

# create a connect gateway
gwPort = GatewayPortIdentity(id= port_id)
Expand Down Expand Up @@ -787,11 +796,8 @@ def test_connect_gateway_with_bfd_config(self):
gatewayType = "connect"

""" test create/update/delete gateway with bfd_config """
# Fetch the list of ports and use a port to create a connect gateway
response = self.dl.list_ports()
assert response is not None

port_id = response.get_result().get("ports")[0].get("id")
# Get the port id to create a connect gateway
port_id = self.get_port_id()

# create a connect gateway
gwPort = GatewayPortIdentity(id= port_id)
Expand Down