ericholguin commented on code in PR #7788:
URL: https://github.com/apache/trafficcontrol/pull/7788#discussion_r1323224397
##########
traffic_ops/testing/api_contract/v4/data/response_template.json:
##########
@@ -2160,5 +2160,39 @@
}
}
}
+ },
+ "logs":{
+ "type": "object",
+ "required": [
+ "ticketNum",
+ "level",
+ "lastUpdated",
+ "user",
+ "id",
+ "message"
+ ],
+ "properties": {
+ "ticketNum": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "string"
Review Comment:
should also include null since its a pointer string
##########
traffic_ops/testing/api_contract/v4/data/response_template.json:
##########
@@ -2160,5 +2160,39 @@
}
}
}
+ },
+ "logs":{
+ "type": "object",
+ "required": [
+ "ticketNum",
+ "level",
+ "lastUpdated",
+ "user",
+ "id",
+ "message"
+ ],
+ "properties": {
+ "ticketNum": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "string"
+ },
+ "lastUpdated": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
Review Comment:
should also include null since its a pointer int
##########
traffic_ops/testing/api_contract/v4/conftest.py:
##########
@@ -1945,3 +1945,23 @@ def server_server_capabilities_data_post(to_session:
TOSession, edge_type_data:N
if msg is None:
logger.error("Server Server Capability returned by Traffic Ops
is missing a 'server_id' property")
pytest.fail("Response from delete request is empty, Failing
test_case")
+
+
[email protected](name="logs_data")
+def logs_data(to_session: TOSession, request_template_data: list[JSONData],
+ ) -> dict[str, object]:
+ """
+ PyTest Fixture to retrieve log data from logs endpoint.
+ :param to_session: Fixture to get Traffic Ops session.
+ :returns: Log data obtained from logs endpoint.
+ """
+
+ change_logs = check_template_data(request_template_data["logs"], "logs")
+
+
+ # Hitting logs GET methed
+ response: tuple[JSONData, requests.Response] =
to_session.get_change_logs(data=change_logs)
Review Comment:
Why is this a get and not a post? This assumes the data exists when we
instead want to create if it doesnt. I think the other fixtures above follow
that
##########
traffic_ops/testing/api_contract/v4/data/response_template.json:
##########
@@ -2160,5 +2160,39 @@
}
}
}
+ },
+ "logs":{
+ "type": "object",
+ "required": [
+ "ticketNum",
+ "level",
+ "lastUpdated",
+ "user",
+ "id",
+ "message"
+ ],
+ "properties": {
+ "ticketNum": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "string"
+ },
+ "lastUpdated": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
Review Comment:
should also include null since its a pointer string
##########
traffic_ops/testing/api_contract/v4/data/response_template.json:
##########
@@ -2160,5 +2160,39 @@
}
}
}
+ },
+ "logs":{
+ "type": "object",
+ "required": [
+ "ticketNum",
+ "level",
+ "lastUpdated",
+ "user",
+ "id",
+ "message"
+ ],
+ "properties": {
+ "ticketNum": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "string"
+ },
+ "lastUpdated": {
+ "type": "string"
Review Comment:
should also include null since its a pointer string
##########
traffic_ops/testing/api_contract/v4/data/response_template.json:
##########
@@ -2160,5 +2160,39 @@
}
}
}
+ },
+ "logs":{
+ "type": "object",
+ "required": [
+ "ticketNum",
+ "level",
+ "lastUpdated",
+ "user",
+ "id",
+ "message"
+ ],
+ "properties": {
+ "ticketNum": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "level": {
+ "type": "string"
+ },
+ "lastUpdated": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
Review Comment:
should also include null since its a pointer string
--
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]