Ringo
11/29/2022, 1:34 PMstart
the main mock server. After that, I create
a new mock server from a pact file. The debug output of the main server shows this:
13:29:03 [DEBUG] (18) pact_mock_server_cli::server: Starting mock server with id 49c8834c-661f-4b65-94ce-03d9384bb330
13:29:03 [DEBUG] (18) pact_mock_server::mock_server: Started mock server on 0.0.0.0:51714
13:29:03 [DEBUG] (18) pact_mock_server_cli::server: mock server started on port 51714
13:29:03 [DEBUG] (18) pact_mock_server_cli::server: Result of starting mock server: Ok(true)
13:29:03 [DEBUG] (4) pact_mock_server_cli::server: Result of thread: Ok(true)
When I run ./pact_mock_server_cli list
after that, the list
call hangs. This is the only debug info shown on the main server:
13:29:30 [DEBUG] (11) hyper::proto::h1::io: parsed 3 headers
13:29:30 [DEBUG] (11) hyper::proto::h1::conn: incoming body is empty
13:29:30 [DEBUG] (11) pact_mock_server_cli::server: main_resource -> resource_exists
13:29:30 [DEBUG] (11) pact_mock_server_cli::server: main_resource -> render_response
Am I doing something wrong? Any known issues with this?Timothy Jones
11/29/2022, 1:36 PMTimothy Jones
11/29/2022, 1:37 PMRingo
11/29/2022, 1:37 PMTimothy Jones
11/29/2022, 1:38 PMTimothy Jones
11/29/2022, 1:38 PMlist
command? What happens if you just start the server, and then try to use it?Timothy Jones
11/29/2022, 1:39 PMstart
?Timothy Jones
11/29/2022, 1:40 PMRingo
11/29/2022, 1:40 PMlist
command was already to debug the fact that my created mock server wasn’t responding at all.Timothy Jones
11/29/2022, 1:41 PMTimothy Jones
11/29/2022, 1:42 PMTimothy Jones
11/29/2022, 1:43 PMTimothy Jones
11/29/2022, 1:43 PMTimothy Jones
11/29/2022, 1:44 PMRingo
11/29/2022, 1:45 PMTimothy Jones
11/29/2022, 1:45 PMTimothy Jones
11/29/2022, 1:46 PMTimothy Jones
11/29/2022, 1:47 PMTimothy Jones
11/29/2022, 1:48 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Ringo
11/29/2022, 1:50 PMbody
when a GET
is done on the given `path`:
{
"provider": {
"name": "PulumiService"
},
"consumer": {
"name": "PulumiCLI"
},
"interactions": [
{
"description": "History request",
"request": {
"method": "GET",
"path": "/api/stacks/redacted_customer_name/redacted_project_name/dev/updates?output-type=service&pageSize=1&page=28",
"headers": {
"Content-Type": "application/json"
},
"body": {},
"matchingRules": {}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json; charset=UTF-8"
},
"body": {
"updates": [
{
"info": {
"kind": "import",
"startTime": 1669315256,
"message": "",
"environment": {},
"config": {},
"result": "succeeded",
"endTime": 1669315256,
"version": 139,
"resourceChanges": {
"create": 0,
"delete": 0,
"same": 58,
"update": 0
}
},
"updateID": "3b1f14e2-bc4e-4b5a-8875-2a56c5fd0217",
"version": 139,
"latestVersion": 139,
"requestedBy": {
"name": "",
"githubLogin": "redacted-user",
"avatarUrl": "<https://avatars.githubusercontent.com>"
}
}
],
"itemsPerPage": 10,
"total": 139
},
"matchingRules": {}
}
}
],
"metadata": {
"pact-specification": {
"version": "3.0.0"
},
"pact-jvm": {
"version": "3.5.6"
}
}
}
Ringo
11/29/2022, 1:50 PMTimothy Jones
11/29/2022, 1:51 PMRingo
11/29/2022, 1:53 PMTimothy Jones
11/29/2022, 1:53 PMTimothy Jones
11/29/2022, 1:53 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
I appreciate that you’re a few layers deep, and not excited to debug the tool you’re using to debug a different thing. Thanks for the pact file!Can totally appreciate those frustrations budd. that is my everyday life - yak shaving party yak 🪒
Ringo
11/29/2022, 1:55 PMRingo
11/29/2022, 1:56 PMYousaf Nabi (pactflow.io)
Ringo
11/29/2022, 1:58 PMYousaf Nabi (pactflow.io)
Timothy Jones
11/29/2022, 2:05 PMTimothy Jones
11/29/2022, 2:05 PMTimothy Jones
11/29/2022, 2:07 PMpact-stub-service
binaryTimothy Jones
11/29/2022, 2:10 PMpath
Timothy Jones
11/29/2022, 2:14 PM{
"provider": {
"name": "PulumiService"
},
"consumer": {
"name": "PulumiCLI"
},
"interactions": [
{
"description": "History request",
"request": {
"method": "GET",
"path": "/api/stacks/redacted_customer_name/redacted_project_name/dev/updates",
"query": "output-type=service&pageSize=1&page=28",
"headers": {
"Content-Type": "application/json"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json; charset=UTF-8"
},
"body": {
"updates": [
{
"info": {
"kind": "import",
"startTime": 1669315256,
"message": "",
"environment": {},
"config": {},
"result": "succeeded",
"endTime": 1669315256,
"version": 139,
"resourceChanges": {
"create": 0,
"delete": 0,
"same": 58,
"update": 0
}
},
"updateID": "3b1f14e2-bc4e-4b5a-8875-2a56c5fd0217",
"version": 139,
"latestVersion": 139,
"requestedBy": {
"name": "",
"githubLogin": "redacted-user",
"avatarUrl": "<https://avatars.githubusercontent.com>"
}
}
],
"itemsPerPage": 10,
"total": 139
}
}
}
],
"metadata": {
"pact-specification": {
"version": "2.0.0"
},
"hand-written": {
"version": "na"
}
}
}
Timothy Jones
11/29/2022, 2:14 PMTimothy Jones
11/29/2022, 2:15 PMTimothy Jones
11/29/2022, 2:15 PMpact-stub-service example.json
Timothy Jones
11/29/2022, 2:18 PMexport PORT= <whatever was in the output of pact-stub-service>
curl -H "Content-Type: application/json" "<http://localhost>:${PORT}/api/stacks/redacted_customer_name/redacted_project_name/dev/updates?output-type=service&pageSize=1&page=28"
Timothy Jones
11/29/2022, 2:19 PMTimothy Jones
11/29/2022, 2:20 PMRingo
11/29/2022, 4:42 PM