Skip to content

Commit

Permalink
connectionv2
Browse files Browse the repository at this point in the history
  • Loading branch information
YufengXin committed Aug 20, 2024
1 parent 8c3f743 commit 007d2bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sdx_controller/test/test_l2vpn_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,27 @@ def test_place_connection_no_topology(self):
# ingress port data, etc., for example.
self.assertStatus(response, 400)

def test_place_connection_v2_no_topology(self):
"""
Test case for place_connection.
Place a connection request with no topology present.
"""
body = ConnectionV2()

response = self.client.open(
f"{BASE_PATH}/l2vpn",
method="POST",
data=json.dumps(body),
content_type="application/json",
)
print(f"Response body is : {response.data.decode('utf-8')}")

# Expect 400 failure because the request is incomplete: the
# bare minimum connection request we sent does not have
# ingress port data, etc., for example.
self.assertStatus(response, 400)

def __test_with_one_topology(self, topology_file):
"""
A helper method to test place_connection() with just one topology.
Expand Down

0 comments on commit 007d2bf

Please sign in to comment.