assertset([node["name"]fornodeingraph_db.nodes.match("ServiceFunctionChainInstance")])=={"test_sfc_premium","test_sfc_non_premium"},"Service function chain instances must not be deleted"
assertset([node["name"]fornodeingraph_db.nodes.match("ServiceFunctionChainInstance")])=={"test_sfc_premium","test_sfc_non_premium"},"Service function chain instances must not be deleted"
assertset([node["name"]fornodeingraph_db.nodes.match("ServiceFunctionChain")])=={"test_sfc"},"Service function chains must not be deleted"
assertset([node["name"]fornodeingraph_db.nodes.match("ServiceFunctionChain")])=={"test_sfc"},"Service function chains must not be deleted"
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',None,None,HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',None,None,HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',None,"nginx",HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',None,"nginx",HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',"nginx_1_ep1",None,HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('e8cd4768-47dd-48cd-9c74-7f8926ddbad8',"nginx_1_ep1",None,HTTPBadRequest,"HTTP Bad Request must be thrown in case of missing or invalid url parameters"),
('random-uuid',"nginx_1_ep1","nginx",HTTPNotFound,"HTTP Not Found error must be thrown for an endpoint node with incorrect request ID"),
('random-uuid',"nginx_1_ep1","nginx",HTTPNotFound,"HTTP Not Found error must be thrown for an endpoint node with incorrect request ID"),
('random-uuid',"minio_1_ep1","minio",HTTPNotFound,"HTTP Not Found error must be thrown for an endpoint node with incorrect request ID"),
('random-uuid',"minio_1_ep1","minio",HTTPNotFound,"HTTP Not Found error must be thrown for an endpoint node with incorrect request ID"),
Tests the error handling of the graph round trip time API endpoint - achieved by sending erroneous input in the request and verifying the appropriate error type has been returned.
Tests the error handling of the graph round trip time API endpoint - achieved by sending erroneous input in the request and verifying the appropriate error type has been returned.
:param graph_id: the UUID of the subgraph
:param graph_id: the UUID of the subgraph
:param endpoint: endpoint ID
:param endpoint: endpoint ID
:param compute_node: compute node ID
:param startpoint: the start node ID
:param error_type: error type to expect as a response
:param error_type: error type to expect as a response
:param error_msg: error message in case of a test failure
:param error_msg: error message in case of a test failure
"""
"""
...
@@ -306,8 +306,8 @@ class TestGraphAPI(object):
...
@@ -306,8 +306,8 @@ class TestGraphAPI(object):
request.matchdict["graph_id"]=graph_id
request.matchdict["graph_id"]=graph_id
ifendpointisnotNone:
ifendpointisnotNone:
request.params["endpoint"]=endpoint
request.params["endpoint"]=endpoint
ifcompute_nodeisnotNone:
ifstartpointisnotNone:
request.params["compute_node"]=compute_node
request.params["startpoint"]=startpoint
error_raised=False
error_raised=False
try:
try:
GraphAPI(request).run_rtt_query()
GraphAPI(request).run_rtt_query()
...
@@ -356,7 +356,7 @@ class TestGraphAPI(object):
...
@@ -356,7 +356,7 @@ class TestGraphAPI(object):
request=testing.DummyRequest()
request=testing.DummyRequest()
request.matchdict["graph_id"]=request_id
request.matchdict["graph_id"]=request_id
request.params["endpoint"]="nginx_1_ep1"
request.params["endpoint"]="nginx_1_ep1"
request.params["compute_node"]="DC0"
request.params["startpoint"]="DC0"
error_raised=False
error_raised=False
try:
try:
GraphAPI(request).run_rtt_query()
GraphAPI(request).run_rtt_query()
...
@@ -367,7 +367,7 @@ class TestGraphAPI(object):
...
@@ -367,7 +367,7 @@ class TestGraphAPI(object):
request=testing.DummyRequest()
request=testing.DummyRequest()
request.matchdict["graph_id"]=request_id
request.matchdict["graph_id"]=request_id
request.params["endpoint"]="apache_1_ep1"
request.params["endpoint"]="apache_1_ep1"
request.params["compute_node"]="DC1"
request.params["startpoint"]="DC1"
error_raised=False
error_raised=False
try:
try:
GraphAPI(request).run_rtt_query()
GraphAPI(request).run_rtt_query()
...
@@ -384,7 +384,7 @@ class TestGraphAPI(object):
...
@@ -384,7 +384,7 @@ class TestGraphAPI(object):
request=testing.DummyRequest()
request=testing.DummyRequest()
request.matchdict["graph_id"]=request_id
request.matchdict["graph_id"]=request_id
request.params["endpoint"]=endpoint
request.params["endpoint"]=endpoint
request.params["compute_node"]=dc
request.params["startpoint"]=dc
response=GraphAPI(request).run_rtt_query()
response=GraphAPI(request).run_rtt_query()
# approximation is used to avoid long float numbers retrieved from influx, the test case ensures the results are different enough so that approximation of +-1 is good enough for testing
# approximation is used to avoid long float numbers retrieved from influx, the test case ensures the results are different enough so that approximation of +-1 is good enough for testing
# approximation is used to avoid long float numbers retrieved from influx, the test case ensures the results are different enough so that approximation of +-1 is good enough for testing
# approximation is used to avoid long float numbers retrieved from influx, the test case ensures the results are different enough so that approximation of +-1 is good enough for testing