ericholguin commented on code in PR #7424:
URL: https://github.com/apache/trafficcontrol/pull/7424#discussion_r1153764780
##########
traffic_ops/testing/api_contract/v4/request_template.json:
##########
@@ -0,0 +1,24 @@
+{
+ "cdns": [
+ {
+ "name": "test",
+ "domainName": "quest",
+ "dnssecEnabled": false
+ }
+ ],
+ "cachegroup": [
+ {
+ "name": "test",
+ "shortName": "test",
+ "latitude": 38.897663,
+ "longitude": -77.036574,
+ "fallbackToClosest": true,
+ "localizationMethods": [
+ "DEEP_CZ",
+ "CZ",
+ "GEO"
+ ],
+ "typeId": 23
Review Comment:
You should get this id programmatically using the Type name and making a GET
request with the name as a query parameter and then replace the typeId with the
returned Id. It wont always be id 23.
##########
traffic_ops/testing/api_contract/v4/conftest.py:
##########
@@ -125,9 +127,14 @@ def pytest_addoption(parser: pytest.Parser) -> None:
default=os.path.join(os.path.dirname(__file__), "to_data.json")
)
parser.addoption(
- "--prerequisites",
- help="Path to prerequisites file.",
- default=os.path.join(os.path.dirname(__file__),
"prerequisite_data.json")
+ "--request-template",
+ help="Path to request prerequisites file.",
+ default=os.path.join(os.path.dirname(__file__),
"request_template.json")
+ )
+ parser.addoption(
+ "--response-template",
+ help="Path to response prerequisites file.",
+ default=os.path.join(os.path.dirname(__file__),
"response_template.json")
)
Review Comment:
Why is this duplicated?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]